Skip to content

Commit

Permalink
fix(*): disable view prop in range and datepicker
Browse files Browse the repository at this point in the history
  • Loading branch information
iljs committed Feb 4, 2025
1 parent 9799f2e commit 02454a4
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton/IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/plasma-b2c/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton/IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/plasma-giga/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton/IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/plasma-web/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton/IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconPlasma, IconCalendarOutline } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton/IconButton';
Expand Down Expand Up @@ -66,6 +66,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/sdds-cs/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton/IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/sdds-dfa/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/sdds-insol/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';

import { IconButton } from '../IconButton';

Expand Down Expand Up @@ -65,6 +65,7 @@ const meta: Meta = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down
3 changes: 2 additions & 1 deletion packages/sdds-serv/src/components/Range/Range.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
import type { StoryObj, Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
import { IconSearch, IconSber, IconArrowRight } from '@salutejs/plasma-icons';

import { IconButton } from '../IconButton';
Expand Down Expand Up @@ -46,6 +46,7 @@ const meta: Meta<typeof Range> = {
},
if: { arg: 'required', truthy: true },
},
...disableProps(['view']),
},
};

Expand Down

0 comments on commit 02454a4

Please sign in to comment.