Skip to content

Commit e3809b0

Browse files
committed
fix(button): use correct border-radius for sm size
1 parent cc58fc3 commit e3809b0

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/ods-react/src/components/button/src/dev.stories.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BUTTON_COLORS, BUTTON_VARIANTS, Button } from '.';
1+
import { BUTTON_COLORS, BUTTON_SIZES, BUTTON_VARIANTS, Button } from '.';
22
import style from './dev.module.css';
33

44
export default {
@@ -52,3 +52,18 @@ export const Accessibility = () => (
5252
Accessibility
5353
</Button>
5454
)
55+
56+
export const Sizes = () => (
57+
<div style={{ display: 'flex', flexFlow: 'row', columnGap: '16px' }}>
58+
{
59+
BUTTON_SIZES.map((size) => (
60+
<Button
61+
style={{ alignSelf: 'center' }}
62+
key={ size }
63+
size={ size }>
64+
Button - { size }
65+
</Button>
66+
))
67+
}
68+
</div>
69+
);

packages/ods-react/src/style/_button.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@use './state';
33

44
$ods-button-border-radius-xs: var(--ods-border-radius-xs);
5+
$ods-button-border-radius-sm: var(--ods-border-radius-sm);
56
$ods-button-border-radius-md: var(--ods-border-radius-md);
67
$ods-button-border-radius-width: var(--ods-border-width-sm);
78
$ods-button-size-xs: 24px;
@@ -40,6 +41,7 @@ $ods-button-size-md: 40px;
4041
font-size: 0.75rem;
4142
} @else if $size == 'sm' {
4243
column-gap: 6px;
44+
border-radius: $ods-button-border-radius-sm;
4345
padding: 5px;
4446
min-width: $ods-button-size-sm;
4547
min-height: $ods-button-size-sm;

0 commit comments

Comments
 (0)