sforkowany z mirror/soapbox
Porównaj commity
3 Commity
develop
...
toast-stor
Autor | SHA1 | Data |
---|---|---|
![]() |
5c0e254a0f | |
![]() |
be2543f7ec | |
![]() |
a893cb72d5 |
|
@ -142,4 +142,7 @@ const Toast = (props: IToast) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Toast;
|
export {
|
||||||
|
Toast as default,
|
||||||
|
Toast,
|
||||||
|
};
|
|
@ -0,0 +1,32 @@
|
||||||
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import { Toast } from 'soapbox/components/ui';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'UI/Toast',
|
||||||
|
component: Toast,
|
||||||
|
argTypes: {
|
||||||
|
t: { defaultValue: { visible: true, dismiss: () => {} }, table: { disable: true } },
|
||||||
|
message: { type: 'string', defaultValue: 'Toast' },
|
||||||
|
type: { defaultValue: 'success' },
|
||||||
|
action: { table: { disable: true } },
|
||||||
|
},
|
||||||
|
} as ComponentMeta<typeof Toast>;
|
||||||
|
|
||||||
|
const Template: ComponentStory<typeof Toast> = (args) => <Toast {...args} />;
|
||||||
|
|
||||||
|
export const Success = Template.bind({});
|
||||||
|
Success.args = {
|
||||||
|
type: 'success',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Error = Template.bind({});
|
||||||
|
Error.args = {
|
||||||
|
type: 'error',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Info = Template.bind({});
|
||||||
|
Info.args = {
|
||||||
|
type: 'info',
|
||||||
|
};
|
Ładowanie…
Reference in New Issue