diff --git a/pkgs/webview-ui/app/src/components/button/index.tsx b/pkgs/webview-ui/app/src/components/button/index.tsx index 8502e2e2e..b9ae956ed 100644 --- a/pkgs/webview-ui/app/src/components/button/index.tsx +++ b/pkgs/webview-ui/app/src/components/button/index.tsx @@ -39,7 +39,7 @@ const sizePaddings: Record = { interface ButtonProps extends JSX.ButtonHTMLAttributes { variant?: Variants; size?: Size; - children: JSX.Element; + children?: JSX.Element; startIcon?: JSX.Element; endIcon?: JSX.Element; class?: string; @@ -67,9 +67,9 @@ export const Button = (props: ButtonProps) => { )} {...other} > - {local.startIcon} - {local.children} - {local.endIcon} + {local.startIcon && {local.startIcon}} + {local.children && {local.children}} + {local.endIcon && {local.endIcon}} ); };