diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 921bf93701..6f07a8b26d 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -31,6 +31,7 @@ export type ButtonShape = 'round' | 'square' | 'default' export type VariantProps = { /** * The style variation of the button + * @deprecated Use `color` instead. */ variant?: ButtonVariant /** @@ -123,6 +124,15 @@ export const Button = React.forwardRef( }, ref, ) => { + /** + * The `variant` prop is deprecated in favor of simply specifying `color`. + * If a `color` is set, then we want to use the existing codepaths for + * "solid" buttons. This is to maintain backwards compatibility. + */ + if (!variant && color) { + variant = 'solid' + } + const t = useTheme() const [state, setState] = React.useState({ pressed: false, diff --git a/src/view/screens/Storybook/index.tsx b/src/view/screens/Storybook/index.tsx index 68432e9c63..1f11748f41 100644 --- a/src/view/screens/Storybook/index.tsx +++ b/src/view/screens/Storybook/index.tsx @@ -52,7 +52,6 @@ function StorybookInner() { <>