Skip to content

Commit

Permalink
add custom square icon button story
Browse files Browse the repository at this point in the history
  • Loading branch information
steppy452 committed Aug 29, 2024
1 parent 3b81461 commit 595e245
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/elements/IconButton/IconButton.story.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { IconButton } from './IconButton';
import { Stack } from '../../layout';
import {
extendTheme,
PartialReablocksTheme
} from '../../utils/Theme/themes/extendTheme';
import { ThemeProvider } from '../../utils/Theme/ThemeProvider';
import { theme } from '../../utils/Theme/themes/theme';

export default {
title: 'Components/Elements/IconButton',
Expand Down Expand Up @@ -123,3 +129,32 @@ export const Variants = () => (
</IconButton>
</div>
);

export const Square = () => {
const iconTheme: PartialReablocksTheme = {
components: {
button: {
iconSizes: {
small: 'p-1',
medium: 'p-2',
large: 'p-2.5'
}
}
}
};
return (
<ThemeProvider theme={extendTheme(theme, iconTheme)}>
<Stack>
<IconButton size="small">
<BellIcon />
</IconButton>
<IconButton size="medium">
<BellIcon />
</IconButton>
<IconButton size="large">
<BellIcon />
</IconButton>
</Stack>
</ThemeProvider>
);
};

0 comments on commit 595e245

Please sign in to comment.