Skip to content

Commit 98b46f8

Browse files
Merge pull request #591 from catho/QTM-784
docs(Alert.mdx): Removing onClose from component usage examples and a…
2 parents 160f344 + cce1c3d commit 98b46f8

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

stories/Alert/Alert.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
Primary,
1010
Success,
1111
Error,
12-
WithIcon
12+
WithIcon,
13+
WithClose
1314
} from './Alert.stories.jsx';
1415

1516
import EvaluationForm from '../../stories/shared/EvaluationForm'
@@ -65,4 +66,10 @@ import Alert from '@catho/quantum/Alert';
6566
<Story of={WithIcon} />
6667
</Canvas>
6768

69+
### With Close
70+
71+
<Canvas>
72+
<Story of={WithClose} />
73+
</Canvas>
74+
6875
<EvaluationForm componentName="Alert" />

stories/Alert/Alert.stories.jsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ const sampleChildren = (
1616
</span>
1717
);
1818

19-
const Template = (args) => (
20-
<Alert onClose={() => {}} {...args}>
21-
{sampleChildren}
22-
</Alert>
23-
);
19+
const Template = (args) => <Alert {...args}>{sampleChildren}</Alert>;
2420

2521
export const Default = Template.bind({});
2622

@@ -44,3 +40,9 @@ WithIcon.args = {
4440
skin: 'primary',
4541
icon: 'info',
4642
};
43+
44+
export const WithClose = Template.bind({});
45+
WithClose.args = {
46+
skin: 'primary',
47+
onClose: () => {},
48+
};

0 commit comments

Comments
 (0)