Skip to content

Commit

Permalink
Merge pull request #591 from catho/QTM-784
Browse files Browse the repository at this point in the history
docs(Alert.mdx): Removing onClose from component usage examples and a…
  • Loading branch information
MarcosViniciusPC authored Oct 11, 2024
2 parents 160f344 + cce1c3d commit 98b46f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 8 additions & 1 deletion stories/Alert/Alert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
Primary,
Success,
Error,
WithIcon
WithIcon,
WithClose
} from './Alert.stories.jsx';

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

### With Close

<Canvas>
<Story of={WithClose} />
</Canvas>

<EvaluationForm componentName="Alert" />
12 changes: 7 additions & 5 deletions stories/Alert/Alert.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ const sampleChildren = (
</span>
);

const Template = (args) => (
<Alert onClose={() => {}} {...args}>
{sampleChildren}
</Alert>
);
const Template = (args) => <Alert {...args}>{sampleChildren}</Alert>;

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

Expand All @@ -44,3 +40,9 @@ WithIcon.args = {
skin: 'primary',
icon: 'info',
};

export const WithClose = Template.bind({});
WithClose.args = {
skin: 'primary',
onClose: () => {},
};

0 comments on commit 98b46f8

Please sign in to comment.