diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 1dc5b4b8..65c0151b 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -8,7 +8,7 @@ import cn from 'classnames'; interface ButtonProps { children: React.ReactNode; onClick?: (event: React.MouseEvent) => void; - active: boolean; + active?: boolean; className?: string; style?: Record; } @@ -16,7 +16,7 @@ interface ButtonProps { export function Button({ children, onClick, - active, + active = false, className, style, }: ButtonProps) { @@ -43,9 +43,4 @@ export function Button({ ); } -Button.defaultProps = { - active: false, - style: {}, -}; - export default Button; diff --git a/src/components/MDX/ExpandableCallout.tsx b/src/components/MDX/ExpandableCallout.tsx index 372c070d..1fb1ea0c 100644 --- a/src/components/MDX/ExpandableCallout.tsx +++ b/src/components/MDX/ExpandableCallout.tsx @@ -52,7 +52,7 @@ const variantMap = { }, }; -function ExpandableCallout({children, type}: ExpandableCalloutProps) { +function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) { const contentRef = useRef(null); const variant = variantMap[type]; @@ -78,8 +78,4 @@ function ExpandableCallout({children, type}: ExpandableCalloutProps) { ); } -ExpandableCallout.defaultProps = { - type: 'note', -}; - export default ExpandableCallout;