Skip to content

Commit

Permalink
Remove unnecessary props from docs (#5023)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowystinger authored Sep 5, 2023
1 parent 061007a commit cea5511
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const customMenuItem = (item) => {
let Icon = iconMap[item.icon];
return (
<Item childItems={item.children} textValue={item.name} key={item.name}>
{item.icon && <Icon size="S" />}
{item.icon && <Icon />}
<Text>{item.name}</Text>
{item.shortcut && <Keyboard>{item.shortcut}</Keyboard>}
</Item>
Expand Down
6 changes: 3 additions & 3 deletions packages/@react-spectrum/menu/docs/ActionMenu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ Items within ActionMenu also allow for additional content used to better communi
import {Keyboard, Text} from '@react-spectrum/text';
<ActionMenu>
<Item key="cut" textValue="cut">
<Cut size="S"/>
<Cut />
<Text>Cut</Text>
<Keyboard>⌘X</Keyboard>
</Item>
<Item key="copy" textValue="copy">
<Copy size="S"/>
<Copy />
<Text>Copy</Text>
<Keyboard>⌘C</Keyboard>
</Item>
<Item key="paste" textValue="paste">
<Paste size="S"/>
<Paste />
<Text>Paste</Text>
<Keyboard>⌘V</Keyboard>
</Item>
Expand Down
6 changes: 3 additions & 3 deletions packages/@react-spectrum/menu/docs/Menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ import {Keyboard, Text} from '@react-spectrum/text';
</ActionButton>
<Menu>
<Item key="cut" textValue="cut">
<Cut size="S"/>
<Cut />
<Text>Cut</Text>
<Keyboard>⌘X</Keyboard>
</Item>
<Item key="copy" textValue="copy">
<Copy size="S"/>
<Copy />
<Text>Copy</Text>
<Keyboard>⌘C</Keyboard>
</Item>
<Item key="paste" textValue="paste">
<Paste size="S"/>
<Paste />
<Text>Paste</Text>
<Keyboard>⌘V</Keyboard>
</Item>
Expand Down
14 changes: 7 additions & 7 deletions packages/@react-spectrum/menu/stories/MenuTrigger.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,34 +507,34 @@ export const MenuWithSemanticElementsStatic = () => (
<Menu onAction={action('action')}>
<Section title="Section 1">
<Item textValue="Copy">
<Copy size="S" />
<Copy />
<Text>Copy</Text>
<Keyboard>⌘C</Keyboard>
</Item>
<Item textValue="Cut">
<Cut size="S" />
<Cut />
<Text>Cut</Text>
<Keyboard>⌘X</Keyboard>
</Item>
<Item textValue="Paste">
<Paste size="S" />
<Paste />
<Text>Paste</Text>
<Keyboard>⌘V</Keyboard>
</Item>
</Section>
<Section title="Section 2">
<Item textValue="Puppy">
<AlignLeft size="S" />
<AlignLeft />
<Text>Puppy</Text>
<Text slot="description">Puppy description super long as well geez</Text>
</Item>
<Item textValue="Doggo with really really really long long long text">
<AlignCenter size="S" />
<AlignCenter />
<Text>Doggo with really really really long long long text</Text>
<Text slot="end">Value</Text>
</Item>
<Item textValue="Floof">
<AlignRight size="S" />
<AlignRight />
<Text>Floof</Text>
</Item>
<Item>Basic Item</Item>
Expand Down Expand Up @@ -669,7 +669,7 @@ let customMenuItem = (item) => {
let Icon = iconMap[item.icon];
return (
<Item childItems={item.children} textValue={item.name} key={item.name}>
{item.icon && <Icon size="S" />}
{item.icon && <Icon />}
<Text>{item.name}</Text>
{item.shortcut && <Keyboard>{item.shortcut}</Keyboard>}
</Item>
Expand Down
12 changes: 6 additions & 6 deletions packages/@react-spectrum/tabs/stories/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,12 @@ interface DynamicTabItem {
}

let items = [
{name: 'Tab 1', children: 'Tab Body 1', icon: <Dashboard size="S" />},
{name: 'Tab 2', children: 'Tab Body 2', icon: <Calendar size="S" />},
{name: 'Tab 3', children: 'Tab Body 3', icon: <Bookmark size="S" />},
{name: 'Tab 4', children: 'Tab Body 4', icon: <Dashboard size="S" />},
{name: 'Tab 5', children: 'Tab Body 5', icon: <Calendar size="S" />},
{name: 'Tab 6', children: 'Tab Body 6', icon: <Bookmark size="S" />}
{name: 'Tab 1', children: 'Tab Body 1', icon: <Dashboard />},
{name: 'Tab 2', children: 'Tab Body 2', icon: <Calendar />},
{name: 'Tab 3', children: 'Tab Body 3', icon: <Bookmark />},
{name: 'Tab 4', children: 'Tab Body 4', icon: <Dashboard />},
{name: 'Tab 5', children: 'Tab Body 5', icon: <Calendar />},
{name: 'Tab 6', children: 'Tab Body 6', icon: <Bookmark />}
] as DynamicTabItem[];

let DynamicTabs = (props: Omit<SpectrumTabsProps<DynamicTabItem>, 'children'>) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/dev/docs/pages/blog/introducing-react-spectrum.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,17 @@ We’ve designed the APIs in React Spectrum to be easy to use. The following exa
<Picker label="Options">
<Section title="Permission">
<Item textValue="Read">
<Book size="S" />
<Book />
<Text>Read</Text>
<Text slot="description">Read Only</Text>
</Item>
<Item textValue="Write">
<Draw size="S" />
<Draw />
<Text>Write</Text>
<Text slot="description">Read and Write Only</Text>
</Item>
<Item textValue="Admin">
<BulkEditUsers size="S" />
<BulkEditUsers />
<Text>Admin</Text>
<Text slot="description">Full access</Text>
</Item>
Expand Down
6 changes: 3 additions & 3 deletions packages/dev/docs/pages/react-spectrum/layout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@ placed using the `slot` prop to specify a named area.
```tsx example
<Picker label="Permission" defaultSelectedKey="read">
<Item textValue="Read" key="read">
<Book size="S" />
<Book />
<Text>Read</Text>
<Text slot="description">Read only</Text>
</Item>
<Item textValue="Write" key="write">
<Draw size="S" />
<Draw />
<Text>Write</Text>
<Text slot="description">Read and write only</Text>
</Item>
<Item textValue="Admin" key="admin">
<BulkEditUsers size="S" />
<BulkEditUsers />
<Text>Admin</Text>
<Text slot="description">Full access</Text>
</Item>
Expand Down

1 comment on commit cea5511

@rspbot
Copy link

@rspbot rspbot commented on cea5511 Sep 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.