diff --git a/src/ReactCodeInput.stories.js b/src/ReactCodeInput.stories.js index 8304fba..1892f5c 100644 --- a/src/ReactCodeInput.stories.js +++ b/src/ReactCodeInput.stories.js @@ -57,6 +57,18 @@ const darkStyle = { stories.addDecorator((story, context) => withInfo('Details')(story)(context)); stories.addDecorator(withKnobs); +// Component for With Reset story +function WithReset() { + const [value, setValue] = React.useState(null); + + return ( + + setValue(null)} value={value} /> + + + ) +} + // Stories for Input Field stories .add( @@ -72,7 +84,8 @@ stories .add( 'Force Uppercase', () => - ); + ) + .add('With Reset', WithReset); // Creation of Props propVariantStories.addDecorator((story, context) => withInfo('Details')(story)(context));