diff --git a/src/components/ui/Category.tsx b/src/components/ui/Category.tsx index 16c14444..ccdd4e91 100644 --- a/src/components/ui/Category.tsx +++ b/src/components/ui/Category.tsx @@ -31,18 +31,20 @@ const CategoryBase = styled.div>` ` } `; -interface Props { +type Props = Omit, 'children' | 'as'> & { text: Children; action?: () => void; variant?: 'default' | 'uniform'; } export default function Category(props: Props) { + let { text, action, ...otherProps } = props; + return ( - - {props.text} - {props.action && ( - + + {text} + {action && ( + )} ); diff --git a/src/components/ui/Overline.tsx b/src/components/ui/Overline.tsx index 86233697..5a9f9d04 100644 --- a/src/components/ui/Overline.tsx +++ b/src/components/ui/Overline.tsx @@ -2,7 +2,7 @@ import styled, { css } from "styled-components"; import { Children } from "../../types/Preact"; import { Text } from 'preact-i18n'; -interface Props { +type Props = Omit, 'children' | 'as'> & { error?: string; block?: boolean; children?: Children;