Skip to content

Commit d312e0a

Browse files
authored
chore: Improve S2 story argTypes (#8360)
1 parent 431241e commit d312e0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+146
-30
lines changed

packages/@react-spectrum/s2/src/NumberField.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
ButtonRenderProps,
2020
ContextValue,
2121
InputContext,
22-
Text,
2322
useContextProps
2423
} from 'react-aria-components';
2524
import {baseColor, space, style} from '../style' with {type: 'macro'};
@@ -245,7 +244,6 @@ export const NumberField = forwardRef(function NumberField(props: NumberFieldPro
245244
</StepButton>
246245
</div>}
247246
</FieldGroup>
248-
{descriptionMessage && <Text slot="description">{descriptionMessage}</Text>}
249247
<HelpText
250248
size={size}
251249
isDisabled={isDisabled}

packages/@react-spectrum/s2/stories/Accordion.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const meta: Meta<typeof Accordion> = {
2323
parameters: {
2424
layout: 'centered'
2525
},
26+
argTypes: {
27+
children: {table: {disable: true}}
28+
},
2629
tags: ['autodocs'],
2730
title: 'Accordion'
2831
};

packages/@react-spectrum/s2/stories/ActionBar.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const meta: Meta<typeof ActionBar> = {
2323
parameters: {
2424
layout: 'centered'
2525
},
26+
argTypes: {
27+
children: {table: {disable: true}}
28+
},
2629
tags: ['autodocs'],
2730
title: 'ActionBar'
2831
};

packages/@react-spectrum/s2/stories/ActionButton.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const meta: Meta<typeof ActionButton> = {
2828
decorators: [StaticColorDecorator],
2929
tags: ['autodocs'],
3030
argTypes: {
31-
...categorizeArgTypes('Events', ['onPress', 'onPressChange', 'onPressEnd', 'onPressStart', 'onPressUp'])
31+
...categorizeArgTypes('Events', ['onPress', 'onPressChange', 'onPressEnd', 'onPressStart', 'onPressUp']),
32+
children: {table: {disable: true}}
3233
},
3334
title: 'ActionButton'
3435
};

packages/@react-spectrum/s2/stories/ActionButtonGroup.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const meta: Meta<typeof ActionButtonGroup> = {
2323
parameters: {
2424
layout: 'centered'
2525
},
26+
argTypes: {
27+
children: {table: {disable: true}}
28+
},
2629
decorators: [StaticColorDecorator],
2730
tags: ['autodocs'],
2831
title: 'ActionButtonGroup'

packages/@react-spectrum/s2/stories/ActionMenu.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const meta: Meta<typeof ActionMenu<any>> = {
2222
},
2323
tags: ['autodocs'],
2424
argTypes: {
25-
...categorizeArgTypes('Events', ['onAction', 'onOpenChange'])
25+
...categorizeArgTypes('Events', ['onAction', 'onOpenChange']),
26+
children: {table: {disable: true}}
2627
},
2728
title: 'ActionMenu'
2829
};

packages/@react-spectrum/s2/stories/Avatar.stories.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ import {style} from '../style' with { type: 'macro' };
1616

1717
const meta: Meta<typeof Avatar> = {
1818
component: Avatar,
19-
argTypes: {},
19+
argTypes: {
20+
size: {
21+
control: 'number'
22+
}
23+
},
2024
parameters: {
2125
layout: 'centered'
2226
},

packages/@react-spectrum/s2/stories/AvatarGroup.stories.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ import {style} from '../style' with {type: 'macro'};
1616

1717
const meta: Meta<typeof AvatarGroup> = {
1818
component: AvatarGroup,
19-
argTypes: {},
2019
parameters: {
2120
layout: 'centered'
2221
},
22+
argTypes: {
23+
children: {table: {disable: true}}
24+
},
2325
tags: ['autodocs'],
2426
title: 'AvatarGroup'
2527
};

packages/@react-spectrum/s2/stories/Badge.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const meta: Meta<typeof Badge> = {
2020
parameters: {
2121
layout: 'centered'
2222
},
23+
argTypes: {
24+
children: {table: {disable: true}}
25+
},
2326
tags: ['autodocs'],
2427
title: 'Badge'
2528
};

packages/@react-spectrum/s2/stories/Breadcrumbs.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ const meta: Meta<typeof Breadcrumbs> = {
3131
},
3232
onAction: {
3333
table: {category: 'Events'}
34-
}
34+
},
35+
children: {table: {disable: true}}
3536
},
3637
tags: ['autodocs'],
3738
title: 'Breadcrumbs'

0 commit comments

Comments
 (0)