Skip to content

Commit

Permalink
fix: passed props dunamically via args
Browse files Browse the repository at this point in the history
  • Loading branch information
2nikhiltom committed Sep 9, 2024
1 parent b331f43 commit e4ffc9f
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions packages/react/src/components/NumberInput/NumberInput.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,18 @@ export const withAILabel = () => (

export const Playground = (args) => {
// const { numberInputArrowTranslationIds, ...rest } = props();
return (
<NumberInput
id="carbon-number"
min={-100}
max={100}
value={50}
label="NumberInput label"
helperText="Optional helper text."
invalidText="Number is not valid"
{...args}
/>
);
return <NumberInput id="carbon-number" {...args} />;
};

Playground.args = {
warnText:
'Warning message that is really long can wrap to more lines but should not be excessively long.',
value: 50,
min: -100,
max: 100,
label: 'NumberInput label',
helperText: 'Optional helper text.',
invalidText: 'Number is not valid',
};

Playground.argTypes = {
Expand Down Expand Up @@ -151,6 +146,12 @@ Playground.argTypes = {
value: {
control: { type: `number` },
},
min: {
control: { type: 'number' },
},
max: {
control: { type: 'number' },
},
warnText: {
control: {
type: 'text',
Expand Down

0 comments on commit e4ffc9f

Please sign in to comment.