Skip to content

Commit 1e89559

Browse files
committed
Update READMEs
1 parent 76ce13f commit 1e89559

File tree

22 files changed

+426
-495
lines changed

22 files changed

+426
-495
lines changed

src/components/ActionList/README.md

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -91,60 +91,39 @@ Each item in an action list should be scannable avoiding unnecessary words and a
9191
Use for the least important actions so the merchant isn’t distracted by secondary tasks. Can also be used for a set of actions that won’t fit in the available screen space.
9292

9393
```jsx
94-
<div style={{height: '200px'}}>
95-
<Popover
96-
active
97-
activator={<Button>Actions</Button>}
98-
>
99-
<ActionList
100-
items={[
101-
{content: 'Import file'},
102-
{content: 'Export file'},
103-
]}
104-
/>
105-
</Popover>
106-
</div>
94+
<ActionList
95+
items={[
96+
{content: 'Import file'},
97+
{content: 'Export file'},
98+
]}
99+
/>
107100
```
108101

109102
### Action list with icons or image
110103

111104
Use when the items benefit from an associated action or image (e.g. a list of products).
112105

113106
```jsx
114-
<div style={{height: '200px'}}>
115-
<Popover
116-
active
117-
activator={<Button>Actions</Button>}
118-
>
119-
<ActionList
120-
items={[
121-
{content: 'Import file', icon: 'import'},
122-
{content: 'Export file', icon: 'export'},
123-
]}
124-
/>
125-
</Popover>
126-
</div>
107+
<ActionList
108+
items={[
109+
{content: 'Import file', icon: 'import'},
110+
{content: 'Export file', icon: 'export'},
111+
]}
112+
/>
127113
```
128114

129115
### Sectioned action list
130116

131117
Use when the items benefit from sections to help differentiate actions.
132118

133119
```jsx
134-
<div style={{height: '200px'}}>
135-
<Popover
136-
active
137-
activator={<Button>Actions</Button>}
138-
>
139-
<ActionList
140-
sections={[{
141-
title: "File options",
142-
items: [
143-
{content: 'Import file', icon: 'import'},
144-
{content: 'Export file', icon: 'export'},
145-
]
146-
}]}
147-
/>
148-
</Popover>
149-
</div>
120+
<ActionList
121+
sections={[{
122+
title: "File options",
123+
items: [
124+
{content: 'Import file', icon: 'import'},
125+
{content: 'Export file', icon: 'export'},
126+
]
127+
}]}
128+
/>
150129
```

src/components/Avatar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Avatars visually clarify the business or the person being represented at
2424
various locations in the interface.
2525

2626
> **Not what you’re looking for?**
27-
>* To create page-level layout, [use the layout component](/components/structure/layout).
27+
>* To show a thumbnail for an object rather than a person or business, [use the thumbnail component](/components/images-and-icons/thumbnail).
2828
2929
---
3030

src/components/Badge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Merchants are pressed for time. They need indicators that let them identify impo
2222
Badges are designed as short, color-coded indicators that help merchants identify critical information quickly.
2323

2424
>**Not what you’re looking for?**
25-
>* To represent an interactive list of categories provided by merchants, [use tags](/components/feedback-indicators/tag).
25+
>* To represent an interactive list of categories provided by merchants, [use tags](/components/forms/tag).
2626
2727
---
2828

src/components/Banner/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Banners are a highly visible way to bring something to a merchant’s attention.
2626
> **Not what you’re looking for?**
2727
>* To inform merchants about a new feature or opportunity, [use callout cards](components/structure/callout-card).
2828
>* To group similar concepts together in the interface, [use a card](/components/structure/card).
29-
>* To show a transient confirmation that an action was successful, [use a flash message](/components/feedback-indicators/flash-message).
3029
3130
---
3231

@@ -224,10 +223,7 @@ including packaging.
224223
Use to convey general information or actions that aren’t critical. For example, you might show a banner that asks for merchant feedback. Default banners contain lower priority information and should always be dismissible.
225224

226225
```jsx
227-
<Banner
228-
title="Order archived"
229-
onDismiss={() => {console.log('dismissed')}}
230-
>
226+
<Banner title="Order archived">
231227
<p>This order was archived on March 7, 2017 at 3:12pm EDT.</p>
232228
</Banner>
233229
```
@@ -237,7 +233,7 @@ Use to convey general information or actions that aren’t critical. For example
237233
Make all banners dismissible, unless they contain critical information or an important action that a merchant is required to take.
238234

239235
```jsx
240-
<Banner onDismiss={() => {console.log('dismissed')}}>
236+
<Banner onDismiss={() => {}}>
241237
<p>Use your finance report to get detailed information about your business. <Link url="">Let us know what you think.</Link></p>
242238
</Banner>
243239
```
@@ -251,7 +247,6 @@ Use when you want merchants to take an action after reading the banner.
251247
title="Some of your product variants are missing weights"
252248
status="warning"
253249
action={{content: 'Edit variant weights'}}
254-
onDismiss={() => {console.log('dismissed')}}
255250
>
256251
<p>Add weights to show accurate rates at checkout and when buying shipping labels in Shopify.</p>
257252
</Banner>
@@ -266,7 +261,6 @@ Use to update merchants about a change or give them advice.
266261
title="USPS has updated their rates"
267262
action={{content: 'Learn more'}}
268263
status="info"
269-
onDismiss={() => {console.log('dismissed')}}
270264
>
271265
<p>USPS has updated their postage rates. Make sure you know how these changes affect your store.</p>
272266
</Banner>
@@ -281,7 +275,6 @@ Use to inform merchants when actions are successfully completed. Include next st
281275
title="Your shipping label is ready to print."
282276
status="success"
283277
action={{content: 'Print label'}}
284-
onDismiss={() => {console.log('dismissed')}}
285278
/>
286279
```
287280

src/components/Button/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ Add a menu item
8787
| children | string | The content to display inside the button. |
8888
| url | string | URL to link to |
8989
| primary | boolean | Display as primary button |
90-
| destructive | boolean | Display as destuctive button |
91-
| disabled | boolean | Display as destuctive button |
90+
| destructive | boolean | Display as destructive button |
91+
| disabled | boolean | Display as destructive button |
9292
| size | enum['slim', 'large'] | Change the size of the button |
9393
| outline | boolean | Display an outlined button |
9494
| fullWidth | boolean | Display full width button |

src/components/Card/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ Use when you have two related but distinct pieces of information to communicate
239239
</Card.Section>
240240

241241
<Card.Section>
242-
<p>View a summary of your Online Store’s performance, including sales,
243-
visitors, top products, and referrals.</p>
242+
<p>View a summary of your Online Store’s performance, including sales, visitors, top products, and referrals.</p>
244243
</Card.Section>
245244
</Card>
246245
```
@@ -256,8 +255,7 @@ Use when you have two related but distinct pieces of information to communicate
256255
</Card.Section>
257256

258257
<Card.Section title="Summary">
259-
<p>View a summary of your Online Store’s performance, including sales,
260-
visitors, top products, and referrals.</p>
258+
<p>View a summary of your Online Store’s performance, including sales, visitors, top products, and referrals.</p>
261259
</Card.Section>
262260
</Card>
263261
```

src/components/DatePicker/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,8 @@ Learn how to [format dates and numbers](/content/grammar-and-mechanics#dates-and
5757
Use when merchants need to select a date range close to today (today is the default starting position for the date picker).
5858

5959
```jsx
60-
<div style={{height: '320px'}}>
61-
<Popover
62-
activator={<Button>Datepicker</Button>}
63-
active
64-
>
65-
<Popover.Section>
66-
<DatePicker
67-
month={4}
68-
year={2017}
69-
/>
70-
</Popover.Section>
71-
</Popover>
72-
</div>
60+
<DatePicker
61+
month={4}
62+
year={2017}
63+
/>
7364
```

src/components/DisplayText/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ merchants
5353

5454
| Prop | Type | Description |
5555
| ---- | ---- | ----------- |
56-
| element | string | Name of element to use for text |
56+
| element | enum['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'] | Name of element to use for text |
5757
| size | enum['small', 'medium', 'large', 'extraLarge'] | Size of the text |
5858
| children | string or React.ReactNode | Content to display |
5959

src/components/KeyboardKey/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,5 @@ The shortcut description should describe what action will be taken if merchants
6262
Use to list a related set of keyboard shortcuts.
6363

6464
```jsx
65-
<p>
66-
<KeyboardKey>Ctl</KeyboardKey> +
67-
<KeyboardKey>Alt</KeyboardKey> +
68-
<KeyboardKey>Delete</KeyboardKey>
69-
</p>
65+
<KeyboardKey>Ctrl</KeyboardKey>
7066
```

src/components/Layout/README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,21 @@ Use to follow a normal section with a secondary section to create a 2/3 + 1/3 la
203203
Use for settings pages. When settings are grouped thematically in annotated sections, the title and description on each section helps merchants quickly find the setting they’re looking for.
204204

205205
```jsx
206-
<Layout.AnnotatedSection
207-
title="Store details"
208-
description="Shopify and your customers will use this information to contact you.">
209-
<Card sectioned>
210-
<FormLayout>
211-
<TextField
212-
label="Store name"
213-
/>
214-
<TextField
215-
type="email"
216-
label="Account email"
217-
/>
218-
</FormLayout>
219-
</Card>
220-
</Layout.AnnotatedSection>
206+
<Layout>
207+
<Layout.AnnotatedSection
208+
title="Store details"
209+
description="Shopify and your customers will use this information to contact you.">
210+
<Card sectioned>
211+
<FormLayout>
212+
<TextField
213+
label="Store name"
214+
/>
215+
<TextField
216+
type="email"
217+
label="Account email"
218+
/>
219+
</FormLayout>
220+
</Card>
221+
</Layout.AnnotatedSection>
222+
</Layout>
221223
```

0 commit comments

Comments
 (0)