-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56dc3d5
commit 273a23f
Showing
8 changed files
with
671 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
import React from 'react' | ||
|
||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { fn } from '@storybook/test' | ||
import Banner from '.' | ||
|
||
const meta = { | ||
title: 'Banner', | ||
component: Banner, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
args: { onActionClick: fn() }, | ||
} satisfies Meta<typeof Banner> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const InfoWhite: Story = { | ||
args: { | ||
label: 'Info White', | ||
caption: 'caption', | ||
variant: 'info-white', | ||
actionLabel: 'Label', | ||
}, | ||
} | ||
|
||
export const InfoGrey: Story = { | ||
args: { | ||
label: 'Info Grey', | ||
caption: 'caption', | ||
variant: 'info-grey', | ||
actionLabel: 'Label', | ||
}, | ||
} | ||
|
||
export const Success: Story = { | ||
args: { | ||
label: 'Success', | ||
caption: 'caption', | ||
variant: 'success', | ||
actionLabel: 'Label', | ||
}, | ||
} | ||
|
||
export const Warning: Story = { | ||
args: { | ||
label: 'Warning', | ||
caption: 'caption', | ||
variant: 'warning', | ||
actionLabel: 'Label', | ||
}, | ||
} | ||
|
||
export const Error: Story = { | ||
args: { | ||
label: 'Error', | ||
caption: 'caption', | ||
variant: 'error', | ||
actionLabel: 'Label', | ||
}, | ||
} | ||
|
||
export const ButtonRight: Story = { | ||
args: { | ||
label: 'Info White', | ||
caption: 'caption', | ||
variant: 'info-white', | ||
actionLabel: 'Label', | ||
isButtonRight: true, | ||
}, | ||
} | ||
|
||
export const Small: Story = { | ||
args: { | ||
label: 'Info White', | ||
caption: 'caption', | ||
variant: 'info-white', | ||
actionLabel: 'Label', | ||
size: 'small', | ||
isButtonRight: true, | ||
}, | ||
} | ||
|
||
export const SmallButtonRight: Story = { | ||
args: { | ||
label: 'Info White', | ||
caption: 'caption', | ||
variant: 'info-white', | ||
actionLabel: 'Label', | ||
size: 'small', | ||
isButtonRight: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,282 @@ | ||
import Banner from '.' | ||
|
||
const BannerDemo = () => ( | ||
<> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-white' | ||
actionLabel='Label' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-white' | ||
actionLabel='Label' | ||
isButtonRight | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-white' | ||
actionLabel='Label' | ||
size='small' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-white' | ||
actionLabel='Label' | ||
isButtonRight | ||
size='small' | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-grey' | ||
actionLabel='Label' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-grey' | ||
actionLabel='Label' | ||
isButtonRight | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-grey' | ||
actionLabel='Label' | ||
size='small' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='info-grey' | ||
actionLabel='Label' | ||
isButtonRight | ||
size='small' | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='success' | ||
actionLabel='Label' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='success' | ||
actionLabel='Label' | ||
isButtonRight | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='success' | ||
actionLabel='Label' | ||
size='small' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='success' | ||
actionLabel='Label' | ||
isButtonRight | ||
size='small' | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='warning' | ||
actionLabel='Label' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='warning' | ||
actionLabel='Label' | ||
isButtonRight | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='warning' | ||
actionLabel='Label' | ||
size='small' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='warning' | ||
actionLabel='Label' | ||
isButtonRight | ||
size='small' | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
}} | ||
> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='error' | ||
actionLabel='Label' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='error' | ||
actionLabel='Label' | ||
isButtonRight | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
gap: '10px', | ||
}} | ||
> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='error' | ||
actionLabel='Label' | ||
size='small' | ||
/> | ||
<Banner | ||
label='Label' | ||
caption='caption' | ||
variant='error' | ||
actionLabel='Label' | ||
isButtonRight | ||
size='small' | ||
/> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
|
||
export default BannerDemo |
Oops, something went wrong.