Skip to content

Commit

Permalink
fix(*): esit storybook textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
iljs committed Dec 16, 2024
1 parent 9b345fa commit 9023754
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 38 deletions.
28 changes: 28 additions & 0 deletions packages/plasma-b2c/src/components/TextArea/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,30 @@ const meta: Meta<TextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
Expand All @@ -157,6 +181,10 @@ const meta: Meta<TextAreaProps> = {
'onFocus',
'onBlur',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down
31 changes: 29 additions & 2 deletions packages/plasma-web/src/components/TextArea/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,32 @@ const meta: Meta<TextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
'contentRight',
'autoComplete',
Expand All @@ -156,9 +181,11 @@ const meta: Meta<TextAreaProps> = {
'onChange',
'onFocus',
'onBlur',
'helperText',
'helperBlock',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down
41 changes: 32 additions & 9 deletions packages/sdds-dfa/src/components/TextArea/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const meta: Meta<StoryTextAreaProps> = {
},
if: { arg: 'required', truthy: false },
},
labelPlacement: {
options: labelPlacements,
status: {
options: statuses,
control: {
type: 'select',
},
Expand All @@ -78,8 +78,8 @@ const meta: Meta<StoryTextAreaProps> = {
type: 'select',
},
},
view: {
options: views,
labelPlacement: {
options: ['inner', 'outer'],
control: {
type: 'select',
},
Expand Down Expand Up @@ -143,6 +143,30 @@ const meta: Meta<StoryTextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
Expand All @@ -162,12 +186,11 @@ const meta: Meta<StoryTextAreaProps> = {
'onChange',
'onFocus',
'onBlur',
'status',
'resize',
'height',
'width',
'helperText',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const meta: Meta<StoryTextAreaProps> = {
},
if: { arg: 'required', truthy: false },
},
labelPlacement: {
options: labelPlacements,
status: {
options: statuses,
control: {
type: 'select',
},
Expand All @@ -78,8 +78,8 @@ const meta: Meta<StoryTextAreaProps> = {
type: 'select',
},
},
view: {
options: views,
labelPlacement: {
options: ['inner', 'outer'],
control: {
type: 'select',
},
Expand Down Expand Up @@ -143,6 +143,30 @@ const meta: Meta<StoryTextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
Expand All @@ -162,12 +186,11 @@ const meta: Meta<StoryTextAreaProps> = {
'onChange',
'onFocus',
'onBlur',
'status',
'resize',
'height',
'width',
'helperText',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down
41 changes: 32 additions & 9 deletions packages/sdds-insol/src/components/TextArea/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const meta: Meta<StoryTextAreaProps> = {
},
if: { arg: 'required', truthy: false },
},
labelPlacement: {
options: labelPlacements,
status: {
options: statuses,
control: {
type: 'select',
},
Expand All @@ -79,8 +79,8 @@ const meta: Meta<StoryTextAreaProps> = {
type: 'select',
},
},
view: {
options: views,
labelPlacement: {
options: ['inner', 'outer'],
control: {
type: 'select',
},
Expand Down Expand Up @@ -144,6 +144,30 @@ const meta: Meta<StoryTextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
Expand All @@ -163,12 +187,11 @@ const meta: Meta<StoryTextAreaProps> = {
'onChange',
'onFocus',
'onBlur',
'status',
'resize',
'height',
'width',
'helperText',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down
41 changes: 32 additions & 9 deletions packages/sdds-serv/src/components/TextArea/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ const meta: Meta<StoryTextAreaProps> = {
},
if: { arg: 'required', truthy: false },
},
labelPlacement: {
options: labelPlacements,
status: {
options: statuses,
control: {
type: 'select',
},
Expand All @@ -78,8 +78,8 @@ const meta: Meta<StoryTextAreaProps> = {
type: 'select',
},
},
view: {
options: views,
labelPlacement: {
options: ['inner', 'outer'],
control: {
type: 'select',
},
Expand Down Expand Up @@ -143,6 +143,30 @@ const meta: Meta<StoryTextAreaProps> = {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'hasHint', truthy: true },
},
helperText: {
control: { type: 'text' },
if: { arg: 'helperText', truthy: true },
},
width: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
height: {
control: { type: 'text' },
if: { arg: 'width', truthy: true },
},
rows: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
cols: {
control: { type: 'text' },
if: { arg: 'number', truthy: true },
},
...disableProps([
'helperBlock',
'$isFocused',
Expand All @@ -162,12 +186,11 @@ const meta: Meta<StoryTextAreaProps> = {
'onChange',
'onFocus',
'onBlur',
'status',
'resize',
'height',
'width',
'helperText',
'leftHelperPlacement',
'status',
'hintTargetIcon',
'hintOffset',
'hintContentLeft',
]),
},
args: {
Expand Down

0 comments on commit 9023754

Please sign in to comment.