Skip to content

Commit cea5511

Browse files
authored
Remove unnecessary props from docs (#5023)
1 parent 061007a commit cea5511

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

packages/@react-spectrum/menu/chromatic/MenuTrigger.chromatic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const customMenuItem = (item) => {
127127
let Icon = iconMap[item.icon];
128128
return (
129129
<Item childItems={item.children} textValue={item.name} key={item.name}>
130-
{item.icon && <Icon size="S" />}
130+
{item.icon && <Icon />}
131131
<Text>{item.name}</Text>
132132
{item.shortcut && <Keyboard>{item.shortcut}</Keyboard>}
133133
</Item>

packages/@react-spectrum/menu/docs/ActionMenu.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,17 @@ Items within ActionMenu also allow for additional content used to better communi
168168
import {Keyboard, Text} from '@react-spectrum/text';
169169
<ActionMenu>
170170
<Item key="cut" textValue="cut">
171-
<Cut size="S"/>
171+
<Cut />
172172
<Text>Cut</Text>
173173
<Keyboard>⌘X</Keyboard>
174174
</Item>
175175
<Item key="copy" textValue="copy">
176-
<Copy size="S"/>
176+
<Copy />
177177
<Text>Copy</Text>
178178
<Keyboard>⌘C</Keyboard>
179179
</Item>
180180
<Item key="paste" textValue="paste">
181-
<Paste size="S"/>
181+
<Paste />
182182
<Text>Paste</Text>
183183
<Keyboard>⌘V</Keyboard>
184184
</Item>

packages/@react-spectrum/menu/docs/Menu.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,17 @@ import {Keyboard, Text} from '@react-spectrum/text';
269269
</ActionButton>
270270
<Menu>
271271
<Item key="cut" textValue="cut">
272-
<Cut size="S"/>
272+
<Cut />
273273
<Text>Cut</Text>
274274
<Keyboard>⌘X</Keyboard>
275275
</Item>
276276
<Item key="copy" textValue="copy">
277-
<Copy size="S"/>
277+
<Copy />
278278
<Text>Copy</Text>
279279
<Keyboard>⌘C</Keyboard>
280280
</Item>
281281
<Item key="paste" textValue="paste">
282-
<Paste size="S"/>
282+
<Paste />
283283
<Text>Paste</Text>
284284
<Keyboard>⌘V</Keyboard>
285285
</Item>

packages/@react-spectrum/menu/stories/MenuTrigger.stories.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -507,34 +507,34 @@ export const MenuWithSemanticElementsStatic = () => (
507507
<Menu onAction={action('action')}>
508508
<Section title="Section 1">
509509
<Item textValue="Copy">
510-
<Copy size="S" />
510+
<Copy />
511511
<Text>Copy</Text>
512512
<Keyboard>⌘C</Keyboard>
513513
</Item>
514514
<Item textValue="Cut">
515-
<Cut size="S" />
515+
<Cut />
516516
<Text>Cut</Text>
517517
<Keyboard>⌘X</Keyboard>
518518
</Item>
519519
<Item textValue="Paste">
520-
<Paste size="S" />
520+
<Paste />
521521
<Text>Paste</Text>
522522
<Keyboard>⌘V</Keyboard>
523523
</Item>
524524
</Section>
525525
<Section title="Section 2">
526526
<Item textValue="Puppy">
527-
<AlignLeft size="S" />
527+
<AlignLeft />
528528
<Text>Puppy</Text>
529529
<Text slot="description">Puppy description super long as well geez</Text>
530530
</Item>
531531
<Item textValue="Doggo with really really really long long long text">
532-
<AlignCenter size="S" />
532+
<AlignCenter />
533533
<Text>Doggo with really really really long long long text</Text>
534534
<Text slot="end">Value</Text>
535535
</Item>
536536
<Item textValue="Floof">
537-
<AlignRight size="S" />
537+
<AlignRight />
538538
<Text>Floof</Text>
539539
</Item>
540540
<Item>Basic Item</Item>
@@ -669,7 +669,7 @@ let customMenuItem = (item) => {
669669
let Icon = iconMap[item.icon];
670670
return (
671671
<Item childItems={item.children} textValue={item.name} key={item.name}>
672-
{item.icon && <Icon size="S" />}
672+
{item.icon && <Icon />}
673673
<Text>{item.name}</Text>
674674
{item.shortcut && <Keyboard>{item.shortcut}</Keyboard>}
675675
</Item>

packages/@react-spectrum/tabs/stories/Tabs.stories.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,12 +664,12 @@ interface DynamicTabItem {
664664
}
665665

666666
let items = [
667-
{name: 'Tab 1', children: 'Tab Body 1', icon: <Dashboard size="S" />},
668-
{name: 'Tab 2', children: 'Tab Body 2', icon: <Calendar size="S" />},
669-
{name: 'Tab 3', children: 'Tab Body 3', icon: <Bookmark size="S" />},
670-
{name: 'Tab 4', children: 'Tab Body 4', icon: <Dashboard size="S" />},
671-
{name: 'Tab 5', children: 'Tab Body 5', icon: <Calendar size="S" />},
672-
{name: 'Tab 6', children: 'Tab Body 6', icon: <Bookmark size="S" />}
667+
{name: 'Tab 1', children: 'Tab Body 1', icon: <Dashboard />},
668+
{name: 'Tab 2', children: 'Tab Body 2', icon: <Calendar />},
669+
{name: 'Tab 3', children: 'Tab Body 3', icon: <Bookmark />},
670+
{name: 'Tab 4', children: 'Tab Body 4', icon: <Dashboard />},
671+
{name: 'Tab 5', children: 'Tab Body 5', icon: <Calendar />},
672+
{name: 'Tab 6', children: 'Tab Body 6', icon: <Bookmark />}
673673
] as DynamicTabItem[];
674674

675675
let DynamicTabs = (props: Omit<SpectrumTabsProps<DynamicTabItem>, 'children'>) => {

packages/dev/docs/pages/blog/introducing-react-spectrum.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@ We’ve designed the APIs in React Spectrum to be easy to use. The following exa
138138
<Picker label="Options">
139139
<Section title="Permission">
140140
<Item textValue="Read">
141-
<Book size="S" />
141+
<Book />
142142
<Text>Read</Text>
143143
<Text slot="description">Read Only</Text>
144144
</Item>
145145
<Item textValue="Write">
146-
<Draw size="S" />
146+
<Draw />
147147
<Text>Write</Text>
148148
<Text slot="description">Read and Write Only</Text>
149149
</Item>
150150
<Item textValue="Admin">
151-
<BulkEditUsers size="S" />
151+
<BulkEditUsers />
152152
<Text>Admin</Text>
153153
<Text slot="description">Full access</Text>
154154
</Item>

packages/dev/docs/pages/react-spectrum/layout.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,17 @@ placed using the `slot` prop to specify a named area.
258258
```tsx example
259259
<Picker label="Permission" defaultSelectedKey="read">
260260
<Item textValue="Read" key="read">
261-
<Book size="S" />
261+
<Book />
262262
<Text>Read</Text>
263263
<Text slot="description">Read only</Text>
264264
</Item>
265265
<Item textValue="Write" key="write">
266-
<Draw size="S" />
266+
<Draw />
267267
<Text>Write</Text>
268268
<Text slot="description">Read and write only</Text>
269269
</Item>
270270
<Item textValue="Admin" key="admin">
271-
<BulkEditUsers size="S" />
271+
<BulkEditUsers />
272272
<Text>Admin</Text>
273273
<Text slot="description">Full access</Text>
274274
</Item>

0 commit comments

Comments
 (0)