Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
Alex Gleason 5c0e254a0f
Toast.stories: update Template for new preview 2023-02-08 10:28:56 -06:00
Alex Gleason be2543f7ec
Merge remote-tracking branch 'origin/develop' into toast-story 2023-02-08 10:27:56 -06:00
Alex Gleason a893cb72d5
Add Toast story 2023-02-03 16:05:48 -06:00
2 zmienionych plików z 36 dodań i 1 usunięć

Wyświetl plik

@ -142,4 +142,7 @@ const Toast = (props: IToast) => {
);
};
export default Toast;
export {
Toast as default,
Toast,
};

Wyświetl plik

@ -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',
};