diff --git a/gui/src/components/commons/Button.tsx b/gui/src/components/commons/Button.tsx index 7524c6f2a..2a054db04 100644 --- a/gui/src/components/commons/Button.tsx +++ b/gui/src/components/commons/Button.tsx @@ -47,7 +47,7 @@ export function Button({ rounded = false, ...props }: { - children: ReactNode; + children?: ReactNode; icon?: ReactNode; variant: 'primary' | 'secondary' | 'tertiary' | 'quaternary'; to?: string; diff --git a/gui/src/components/commons/Typography.tsx b/gui/src/components/commons/Typography.tsx index 2f8ae100e..5e115cc90 100644 --- a/gui/src/components/commons/Typography.tsx +++ b/gui/src/components/commons/Typography.tsx @@ -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 || [] ); }