Merge pull request #30085 from backstage/canon-button-default-size

Canon - Update default size for Button
This commit is contained in:
Charles de Dreuille
2025-05-30 09:50:02 +01:00
committed by GitHub
3 changed files with 15 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/canon': minor
---
We are updating the default size of the Button component in Canon to be small instead of medium.
@@ -34,15 +34,17 @@ const meta = {
options: ['primary', 'secondary'],
},
},
args: {
size: 'medium',
variant: 'primary',
},
} satisfies Meta<typeof Button>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
children: 'Button',
},
};
export const Variants: Story = {
args: {
children: 'Button',
@@ -72,12 +74,12 @@ export const Sizes: Story = {
},
render: () => (
<Flex align="center">
<Button size="medium" iconStart={<Icon name="cloud" />}>
Medium
</Button>
<Button size="small" iconStart={<Icon name="cloud" />}>
Small
</Button>
<Button size="medium" iconStart={<Icon name="cloud" />}>
Medium
</Button>
</Flex>
),
};
@@ -24,7 +24,7 @@ import type { ButtonProps } from './types';
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
(props: ButtonProps, ref) => {
const {
size = 'medium',
size = 'small',
variant = 'primary',
disabled,
iconStart,