mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
All class name to be set on category / overline.
This commit is contained in:
@@ -31,18 +31,20 @@ const CategoryBase = styled.div<Pick<Props, 'variant'>>`
|
||||
` }
|
||||
`;
|
||||
|
||||
interface Props {
|
||||
type Props = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children' | 'as'> & {
|
||||
text: Children;
|
||||
action?: () => void;
|
||||
variant?: 'default' | 'uniform';
|
||||
}
|
||||
|
||||
export default function Category(props: Props) {
|
||||
let { text, action, ...otherProps } = props;
|
||||
|
||||
return (
|
||||
<CategoryBase>
|
||||
{props.text}
|
||||
{props.action && (
|
||||
<Plus size={16} onClick={props.action} />
|
||||
<CategoryBase {...otherProps}>
|
||||
{text}
|
||||
{action && (
|
||||
<Plus size={16} onClick={action} />
|
||||
)}
|
||||
</CategoryBase>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user