Add quadrant overview pages
This commit is contained in:
22
js/components/Badge.js
Normal file
22
js/components/Badge.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
|
||||
export default function Badge({ onClick, big, type, children }) {
|
||||
const Comp = typeof onClick === 'function' ? 'a' : 'span';
|
||||
return (
|
||||
<Comp
|
||||
className={classNames(
|
||||
'badge',
|
||||
`badge--${type}`,
|
||||
{
|
||||
'badge--big': big === true,
|
||||
}
|
||||
)}
|
||||
onClick={onClick}
|
||||
href={Comp === 'a' ? '#' : undefined}
|
||||
>
|
||||
{children}
|
||||
</Comp>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user