Skip to content

Commit df3e5a6

Browse files
authored
Docs - nest icons export for auto example component (#3445)
* nest icons export for auto example component * nest icons export for auto example component
1 parent 91d3758 commit df3e5a6

File tree

18 files changed

+56
-55
lines changed

18 files changed

+56
-55
lines changed

src/Accordion/docs/examples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const withButton = `
2323
{
2424
title: 'Second Row With Icon',
2525
children: <Text>${text}</Text>,
26-
icon: <InfoCircle />,
26+
icon: <Icons.InfoCircle />,
2727
expandLabel: 'Show More',
2828
collapseLabel: 'Less',
2929
},
@@ -59,7 +59,7 @@ export const inCard = `
5959
[
6060
{
6161
title: 'First Item',
62-
icon: <InfoCircle />,
62+
icon: <Icons.InfoCircle />,
6363
expandLabel: 'More',
6464
collapseLabel: 'Less',
6565
buttonType: 'button',

src/Badge/docs/examples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const withIcon = `
22
<Layout cols={2} gap={0} justifyItems="center">
3-
<Badge size="small" prefixIcon={<ChevronDownSmall/>}>small badge</Badge>
4-
<Badge size="medium" prefixIcon={<ChevronDown/>}>medium badge</Badge>
3+
<Badge size="small" prefixIcon={<Icons.ChevronDownSmall/>}>small badge</Badge>
4+
<Badge size="medium" prefixIcon={<Icons.ChevronDown/>}>medium badge</Badge>
55
</Layout>
66
`;

src/Box/docs/examples/ExampleEventItem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Box minHeight={200} dataHook="storybook-multiple-boxes-within-box">
44
<Box align="center" verticalAlign="middle" width={230} backgroundColor="B40">
55
<Box padding={2} color="B25" backgroundColor="B50" borderRadius="50%">
6-
<Image />
6+
<Icons.Image />
77
</Box>
88
</Box>
99
<Box
@@ -21,12 +21,12 @@
2121
</Box>
2222
<Box align="space-between">
2323
<Box verticalAlign="middle" color="D10">
24-
<Hint />
24+
<Icons.Hint />
2525
<Box marginLeft={1}>Event location is TBD</Box>
2626
</Box>
2727
<Box align="space-between" verticalAlign="middle" minWidth={115}>
2828
<IconButton priority="secondary" size="small">
29-
<More />
29+
<Icons.More />
3030
</IconButton>
3131
<Button upgrade priority="secondary" size="small">
3232
Edit

src/Button/docs/examples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export const sizes = `
5959

6060
export const affixes = `
6161
<Layout cols={4} gap="10px">
62-
<Button size="medium" prefixIcon={<Add />}>Prefix</Button>
63-
<Button size="small" suffixIcon={<ChevronDownSmall/>}>Suffix</Button>
62+
<Button size="medium" prefixIcon={<Icons.Add />}>Prefix</Button>
63+
<Button size="small" suffixIcon={<Icons.ChevronDownSmall/>}>Suffix</Button>
6464
</Layout>
6565
`;
6666

src/CloseButton/docs/examples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const skins = `
1717
export const custom = `
1818
<Layout gap={0} justifyItems="center">
1919
<Box backgroundColor="B20">
20-
<CloseButton skin="lightFilled"><Help /></CloseButton>
20+
<CloseButton skin="lightFilled"><Icons.Help /></CloseButton>
2121
</Box>
2222
<Box backgroundColor="B20">
2323
<CloseButton skin="lightFilled"/>

src/CounterBadge/docs/index.story.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const counterBadgeSkinExample = `
3535
const exampleValues = [
3636
{ label: 'Single digit', value: 1 },
3737
{ label: '2 digits', value: 56 },
38-
{ label: 'Icon', value: '<Hint />' },
38+
{ label: 'Icon', value: '<Icons.Hint />' },
3939
];
4040

4141
const iconValuesExample = `

src/DropdownBase/docs/examples/ExampleUncontrolledClick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
>
1515
{({ toggle, selectedOption = {} }) => {
1616
return (
17-
<TextButton upgrade skin="dark" suffixIcon={<ChevronDown />} onClick={toggle}>
17+
<TextButton upgrade skin="dark" suffixIcon={<Icons.ChevronDown />} onClick={toggle}>
1818
{selectedOption.value || 'Please choose'}
1919
</TextButton>
2020
);

src/DropdownBase/docs/examples/ExampleUncontrolledIcon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{({ open, close }) => {
1616
return (
1717
<IconButton skin="inverted" onMouseEnter={open} onMouseLeave={close}>
18-
<Date />
18+
<Icons.Date />
1919
</IconButton>
2020
);
2121
}}

src/FloatingNotification/docs/examples/ExampleAllOptions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div style={{display: 'flex', flexWrap: 'wrap'}}>
33
<div style={{marginRight: '12px', marginBottom: '12px'}}><FloatingNotification
44
text="this is some text"
5-
prefixIcon={<StatusComplete />}
5+
prefixIcon={<Icons.StatusComplete />}
66
/></div>
77
<div style={{marginRight: '12px', marginBottom: '12px'}}><FloatingNotification
88
text="this is some text"
@@ -28,14 +28,14 @@
2828
showTextButton
2929
textButtonProps={{ label: 'Trash' }}
3030
showCloseButton={false}
31-
prefixIcon={<StatusComplete />}
31+
prefixIcon={<Icons.StatusComplete />}
3232
/></div>
3333
<div style={{marginRight: '12px', marginBottom: '12px'}}><FloatingNotification
3434
text="this is some text"
3535
showButton
3636
buttonProps={{ label: 'Undo' }}
3737
showTextButton
3838
textButtonProps={{ label: 'Trash' }}
39-
prefixIcon={<StatusComplete />}
39+
prefixIcon={<Icons.StatusComplete />}
4040
/></div>
4141
</div>

src/IconButton/docs/examples.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ export const skins = `
22
<Layout cols={3} gap={0} justifyItems="center" alignItems="center">
33
<Box padding={1} backgroundColor="D80">
44
<IconButton>
5-
<More />
5+
<Icons.More />
66
</IconButton>
77
</Box>
88
<IconButton skin="inverted">
9-
<More />
9+
<Icons.More />
1010
</IconButton>
1111
<Box padding={1} backgroundColor="D10">
1212
<IconButton skin="light">
13-
<More />
13+
<Icons.More />
1414
</IconButton>
1515
</Box>
1616
</Layout>
@@ -20,26 +20,26 @@ export const priority = `
2020
<Layout cols={3} gap={0} justifyItems="center">
2121
<Box padding={1} backgroundColor="D80">
2222
<IconButton priority="secondary">
23-
<X />
23+
<Icons.X />
2424
</IconButton>
2525
<IconButton priority="primary">
26-
<Check />
26+
<Icons.Check />
2727
</IconButton>
2828
</Box>
2929
<Box padding={1}>
3030
<IconButton priority="secondary" skin="inverted">
31-
<X />
31+
<Icons.X />
3232
</IconButton>
3333
<IconButton priority="primary" >
34-
<Check />
34+
<Icons.Check />
3535
</IconButton>
3636
</Box>
3737
<Box padding={1} backgroundColor="D10">
3838
<IconButton priority="secondary" skin="light">
39-
<X />
39+
<Icons.X />
4040
</IconButton>
4141
<IconButton priority="primary" skin="light">
42-
<Check />
42+
<Icons.Check />
4343
</IconButton>
4444
</Box>
4545
</Layout>
@@ -48,32 +48,32 @@ export const priority = `
4848
export const size = `
4949
<Layout cols={2} gap={0} justifyItems="center">
5050
<IconButton>
51-
<More />
51+
<Icons.More />
5252
</IconButton>
5353
<IconButton size="small">
54-
<MoreSmall />
54+
<Icons.MoreSmall />
5555
</IconButton>
5656
</Layout>
5757
`;
5858

5959
export const disabled = `
6060
<Layout cols={2} gap={0} justifyItems="center">
6161
<IconButton>
62-
<More />
62+
<Icons.More />
6363
</IconButton>
6464
<IconButton disabled>
65-
<More />
65+
<Icons.More />
6666
</IconButton>
6767
</Layout>
6868
`;
6969

7070
export const custom = `
7171
<Layout cols={2} gap={0} justifyItems="center">
7272
<IconButton as="a">
73-
<More />
73+
<Icons.More />
7474
</IconButton>
7575
<IconButton as={Link} to="/wix">
76-
<More />
76+
<Icons.More />
7777
</IconButton>
7878
</Layout>
7979
`;

src/Input/docs/examples.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const iconAffix = `
7676
size="small"
7777
prefix={
7878
<Input.IconAffix>
79-
<DateSmall />
79+
<Icons.DateSmall />
8080
</Input.IconAffix>
8181
}
8282
/>
@@ -86,7 +86,7 @@ export const iconAffix = `
8686
size="small"
8787
suffix={
8888
<Input.IconAffix>
89-
<SearchSmall />
89+
<Icons.SearchSmall />
9090
</Input.IconAffix>
9191
}
9292
/>
@@ -95,12 +95,12 @@ export const iconAffix = `
9595
<Input
9696
prefix={
9797
<Input.IconAffix>
98-
<Date />
98+
<Icons.Date />
9999
</Input.IconAffix>
100100
}
101101
suffix={
102102
<Input.IconAffix>
103-
<Search />
103+
<Icons.Search />
104104
</Input.IconAffix>
105105
}
106106
/>
@@ -110,12 +110,12 @@ export const iconAffix = `
110110
size="large"
111111
prefix={
112112
<Input.IconAffix>
113-
<ChevronRightLarge/>
113+
<Icons.ChevronRightLarge/>
114114
</Input.IconAffix>
115115
}
116116
suffix={
117117
<Input.IconAffix>
118-
<ChevronRightLarge/>
118+
<Icons.ChevronRightLarge/>
119119
</Input.IconAffix>
120120
}
121121
status="error"

src/ListItemAction/docs/Example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
listItemActionBuilder({
2222
id: 2,
2323
title: 'Some very very long long long Name',
24-
prefixIcon: <Edit />,
24+
prefixIcon: <Icons.Edit />,
2525
}),
2626
listItemActionBuilder({
2727
id: 3,

src/ListItemAction/docs/ExamplePrefixIcon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
listItemActionBuilder({
1111
id: 1,
1212
title: 'Prefix Icon',
13-
prefixIcon: <Edit />,
13+
prefixIcon: <Icons.Edit />,
1414
}),
1515
]}
1616
/>

src/NumberInput/docs/examples.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const iconAffix = `
3434
<NumberInput
3535
prefix={
3636
<Input.IconAffix>
37-
<Contrast />
37+
<Icons.Contrast />
3838
</Input.IconAffix>
3939
}
4040
/>
@@ -43,7 +43,7 @@ export const iconAffix = `
4343
<NumberInput
4444
suffix={
4545
<Input.IconAffix>
46-
<Search />
46+
<Icons.Search />
4747
</Input.IconAffix>
4848
}
4949
/>
@@ -52,12 +52,12 @@ export const iconAffix = `
5252
<NumberInput
5353
prefix={
5454
<Input.IconAffix>
55-
<Contrast />
55+
<Icons.Contrast />
5656
</Input.IconAffix>
5757
}
5858
suffix={
5959
<Input.IconAffix>
60-
<Search />
60+
<Icons.Search />
6161
</Input.IconAffix>
6262
}
6363
/>
@@ -66,12 +66,12 @@ export const iconAffix = `
6666
<NumberInput
6767
prefix={
6868
<Input.IconAffix>
69-
<Contrast />
69+
<Icons.Contrast />
7070
</Input.IconAffix>
7171
}
7272
suffix={
7373
<Input.IconAffix>
74-
<Search />
74+
<Icons.Search />
7575
</Input.IconAffix>
7676
}
7777
status="error"

src/Page/docs/ExampleStickyTableWithGap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,24 +134,24 @@ class ProductTable extends React.Component {
134134
secondaryActions={[
135135
{
136136
text: 'Star',
137-
icon: <Star />,
137+
icon: <Icons.Star />,
138138
onClick: () => window.alert(`Starring ${rowData.name}`),
139139
},
140140
{
141141
text: 'Download',
142-
icon: <Download />,
142+
icon: <Icons.Download />,
143143
onClick: () =>
144144
window.alert(`Downloading ${rowData.name}`),
145145
},
146146
{
147147
text: 'Duplicate',
148-
icon: <Duplicate />,
148+
icon: <Icons.Duplicate />,
149149
onClick: () =>
150150
window.alert(`Duplicating ${rowData.name}`),
151151
},
152152
{
153153
text: 'Print',
154-
icon: <Print />,
154+
icon: <Icons.Print />,
155155
onClick: () => window.alert(`Printing ${rowData.name}`),
156156
},
157157
]}

src/TextButton/docs/examples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const underline = `
2727

2828
export const affixes = `
2929
<Layout cols={2} gap={0} justifyItems="center">
30-
<TextButton size="small" prefixIcon={<ChevronDown />}>prefix</TextButton>
31-
<TextButton size="medium" suffixIcon={<ChevronDownSmall />}>suffix</TextButton>
30+
<TextButton size="small" prefixIcon={<Icons.ChevronDown />}>prefix</TextButton>
31+
<TextButton size="medium" suffixIcon={<Icons.ChevronDownSmall />}>suffix</TextButton>
3232
</Layout>
3333
`;
3434

stories/PageLayout/ExampleEmptyState.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import React from 'react';
23
import Page from 'wix-style-react/Page';
34
import Button from 'wix-style-react/Button';
@@ -11,7 +12,7 @@ class ExampleGeneralLayout extends React.Component {
1112
renderHeader() {
1213
const ActionBar = () => {
1314
return (
14-
<Button withNewIcons prefixIcon={<Add />}>
15+
<Button withNewIcons prefixIcon={<Icons.Add />}>
1516
New Item
1617
</Button>
1718
);
@@ -57,7 +58,7 @@ class ExampleGeneralLayout extends React.Component {
5758
theme="page"
5859
title="You don't have any items yet"
5960
>
60-
<TextButton prefixIcon={<Add />}>New Item</TextButton>
61+
<TextButton prefixIcon={<Icons.Add />}>New Item</TextButton>
6162
</EmptyState>
6263
</Col>
6364
</Row>

0 commit comments

Comments
 (0)