Skip to content

Commit

Permalink
Confirm stories added description & default value
Browse files Browse the repository at this point in the history
  • Loading branch information
g-stamatis committed Jan 14, 2022
1 parent cb6f25b commit 85cda14
Showing 1 changed file with 42 additions and 3 deletions.
45 changes: 42 additions & 3 deletions src/customizations/components/theme/Confirm/Confirm.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,49 @@ import { Button, Confirm } from 'semantic-ui-react';
export default {
title: 'Components/Confirm',
component: Confirm,
parameters: {
actions: {
handles: ['click'],
},
},
argTypes: {
size: {
control: { type: 'inline-radio' },
options: ['mini', 'tiny', 'small', 'large'],
description:"confirmation modal size",
table:{
type:{summary:"string"},
defaultValue:{summary:'small'}
}
},
confirmHeader:{
description:"modal header",
table:{
type:{summary:'string'},
defaultValue:{summary:' \""\ '}
}
},
content:{
description:"modal message",
table:{
type:{summary:'string'},
defaultValue:{summary:' \""\ '}
}
},
cancelButton:{
description:"cancel button text",
table:{
type:{summary:'string'},
defaultValue:{summary:' \""\ '}
}
},
confirmButton:{
description:"confirmation button text",
table:{
type:{summary:'string'},
defaultValue:{summary:' \""\ '}
}
}
},
};

Expand All @@ -30,10 +68,11 @@ function ConfirmContent({
};
return (
<div>
<Button primary onClick={openConfirm}>
<Button className="eeaPrimaryButton" onClick={openConfirm}>
Show Confirmation
</Button>
<Confirm
className="eeaModal"
open={open}
header={confirmHeader}
onCancel={closeConfirm}
Expand All @@ -51,9 +90,9 @@ const Template = (args) => <ConfirmContent {...args}></ConfirmContent>;

export const Default = Template.bind({});
Default.args = {
size: 'small',
confirmHeader: 'This is the confirm header',
content: 'Are you sure?',
cancelButton: 'Cancel',
confirmButton: 'OK',
content: 'Are you sure?',
size: 'small',
};

0 comments on commit 85cda14

Please sign in to comment.