mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 09:01:20 -08:00
Make button and typography children optional (#872)
This commit is contained in:
1 parent
4fa5c3f767
commit
a39c8c2018
2 files changed
+3
-3
No files matched your search
@@ -47,7 +47,7 @@ export function Button({
|
||||
rounded = false,
|
||||
...props
|
||||
}: {
|
||||
children: ReactNode;
|
||||
children?: ReactNode;
|
||||
icon?: ReactNode;
|
||||
variant: 'primary' | 'secondary' | 'tertiary' | 'quaternary';
|
||||
to?: string;
|
||||
|
||||
@@ -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 || []
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user