File tree Expand file tree Collapse file tree 2 files changed +66
-0
lines changed
packages/go-ui-storybook/src/stories Expand file tree Collapse file tree 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ import type {
2+ Meta ,
3+ StoryObj ,
4+ } from '@storybook/react' ;
5+
6+ import Alert from './Alert' ;
7+
8+ const meta = {
9+ title : 'Components/Alert' ,
10+ component : Alert ,
11+ parameters : {
12+ layout : 'centered' ,
13+ allowfullscreen : true ,
14+ } ,
15+ tags : [ 'autodocs' ] ,
16+ argTypes : { } ,
17+ } satisfies Meta < typeof Alert > ;
18+
19+ export default meta ;
20+ type Story = StoryObj < typeof meta > ;
21+
22+ export const Info : Story = {
23+ args : {
24+ name : 'info' ,
25+ title : 'Information' ,
26+ type : 'info' ,
27+ } ,
28+ } ;
29+
30+ export const Success : Story = {
31+ args : {
32+ name : 'success' ,
33+ title : 'Success' ,
34+ type : 'success' ,
35+ } ,
36+ } ;
37+
38+ export const Warning : Story = {
39+ args : {
40+ name : 'warning' ,
41+ title : 'Warning' ,
42+ type : 'warning' ,
43+ } ,
44+ } ;
45+
46+ export const Danger : Story = {
47+ args : {
48+ name : 'danger' ,
49+ title : 'Danger' ,
50+ type : 'danger' ,
51+ } ,
52+ } ;
Original file line number Diff line number Diff line change 1+ import {
2+ Alert as PureAlert ,
3+ AlertProps as PureAlertProps ,
4+ } from '@ifrc-go/ui' ;
5+
6+ interface AlertProps < N extends string > extends PureAlertProps < N > { }
7+
8+ function WrappedAlert < N extends string > ( props : AlertProps < N > ) {
9+ return (
10+ < PureAlert { ...props } /> // eslint-disable-line react/jsx-props-no-spreading
11+ ) ;
12+ }
13+
14+ export default WrappedAlert ;
You can’t perform that action at this time.
0 commit comments