Make button and typography children optional (#872)

This commit is contained in:
lucas lelievre authored and GitHub committed 2023-11-03 18:33:05 -03:00
1 parent 4fa5c3f767
commit a39c8c2018
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ export function Button({
rounded = false,
...props
}: {
children: ReactNode;
children?: ReactNode;
icon?: ReactNode;
variant: 'primary' | 'secondary' | 'tertiary' | 'quaternary';
to?: string;
+2 -2
View File
@@ -25,7 +25,7 @@ export function Typography({
| 'whitespace-pre'
| 'whitespace-pre-line'
| 'whitespace-pre-wrap';
children: ReactNode;
children?: ReactNode;
}) {
const tag = useMemo(() => {
const tags = {
@@ -58,6 +58,6 @@ export function Typography({
italic && 'italic',
]),
},
children
children || []
);
}