Migrated Storybook notation from CSF2 to CSF3 (#3412)
* Migrate web action-buttons directory to CSF3 notation * Migrate web chat directory to CSF3 notation * Migrate web common directory to CSF3 notation * Migrate web layout directory to CSF3 notation * Migrate web modals directory to CSF3 notation * Migrate web ui directory to CSF3 notation * Migrate web video directory to CSF3 notation * Migrate web stories directory to CSF3 notation
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
||||
import { Meta } from '@storybook/react';
|
||||
import { ComponentError } from './ComponentError';
|
||||
|
||||
export default {
|
||||
const meta = {
|
||||
title: 'owncast/Components/Component Error',
|
||||
component: ComponentError,
|
||||
parameters: {
|
||||
@@ -12,31 +11,35 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
} as ComponentMeta<typeof ComponentError>;
|
||||
} satisfies Meta<typeof ComponentError>;
|
||||
|
||||
const Template: ComponentStory<typeof ComponentError> = args => <ComponentError {...args} />;
|
||||
export default meta;
|
||||
|
||||
export const DefaultMessage = Template.bind({});
|
||||
DefaultMessage.args = {
|
||||
componentName: 'Test Component',
|
||||
};
|
||||
|
||||
export const Error1 = Template.bind({});
|
||||
Error1.args = { message: 'This is a test error message.', componentName: 'Test Component' };
|
||||
|
||||
export const WithDetails = Template.bind({});
|
||||
WithDetails.args = {
|
||||
message: 'This is a test error message.',
|
||||
componentName: 'Test Component',
|
||||
details: 'Here are some additional details about the error.',
|
||||
};
|
||||
|
||||
export const CanRetry = Template.bind({});
|
||||
CanRetry.args = {
|
||||
message: 'This is a test error message.',
|
||||
componentName: 'Test Component',
|
||||
details: 'Here are some additional details about the error.',
|
||||
retryFunction: () => {
|
||||
console.log('retrying');
|
||||
export const DefaultMessage = {
|
||||
args: {
|
||||
componentName: 'Test Component',
|
||||
},
|
||||
};
|
||||
|
||||
export const Error1 = {
|
||||
args: { message: 'This is a test error message.', componentName: 'Test Component' },
|
||||
};
|
||||
|
||||
export const WithDetails = {
|
||||
args: {
|
||||
message: 'This is a test error message.',
|
||||
componentName: 'Test Component',
|
||||
details: 'Here are some additional details about the error.',
|
||||
},
|
||||
};
|
||||
|
||||
export const CanRetry = {
|
||||
args: {
|
||||
message: 'This is a test error message.',
|
||||
componentName: 'Test Component',
|
||||
details: 'Here are some additional details about the error.',
|
||||
retryFunction: () => {
|
||||
console.log('retrying');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user