Skip to content

Commit 44cb8aa

Browse files
authored
Merge pull request #1794 from Shopify/update-textfield-in-examples
Added required onChange prop missing from text fields in examples
2 parents 0ec8f58 + cdb940c commit 44cb8aa

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/components/FormLayout/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ Use to stack form fields vertically, which makes them easier to scan and complet
113113

114114
```jsx
115115
<FormLayout>
116-
<TextField label="Store name" />
117-
<TextField type="email" label="Account email" />
116+
<TextField label="Store name" onChange={() => {}} />
117+
<TextField type="email" label="Account email" onChange={() => {}} />
118118
</FormLayout>
119119
```
120120

@@ -129,8 +129,8 @@ Field groups will wrap automatically on smaller screens.
129129
```jsx
130130
<FormLayout>
131131
<FormLayout.Group>
132-
<TextField type="number" label="Minimum order" />
133-
<TextField type="number" label="Maximum order" />
132+
<TextField type="number" label="Minimum order" onChange={() => {}} />
133+
<TextField type="number" label="Maximum order" onChange={() => {}} />
134134
</FormLayout.Group>
135135
</FormLayout>
136136
```
@@ -142,10 +142,10 @@ For very short inputs, the width of the inputs may be reduced in order to fit mo
142142
```jsx
143143
<FormLayout>
144144
<FormLayout.Group condensed>
145-
<TextField label="Length" />
146-
<TextField label="Width" />
147-
<TextField label="Height" />
148-
<TextField label="Unit" />
145+
<TextField label="Length" onChange={() => {}} />
146+
<TextField label="Width" onChange={() => {}} />
147+
<TextField label="Height" onChange={() => {}} />
148+
<TextField label="Unit" onChange={() => {}} />
149149
</FormLayout.Group>
150150
</FormLayout>
151151
```

src/components/Layout/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ Use for settings pages. When settings are grouped thematically in annotated sect
221221
>
222222
<Card sectioned>
223223
<FormLayout>
224-
<TextField label="Store name" />
225-
<TextField type="email" label="Account email" />
224+
<TextField label="Store name" onChange={() => {}} />
225+
<TextField type="email" label="Account email" onChange={() => {}} />
226226
</FormLayout>
227227
</Card>
228228
</Layout.AnnotatedSection>

src/components/VisuallyHidden/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ Always provide a heading for a major page section such as a card. In rare cases
5151
<Heading>Title and description</Heading>
5252
</VisuallyHidden>
5353
<FormLayout>
54-
<TextField label="Title" value="Artisanal Wooden Spoon" />
55-
<TextField label="Description" multiline />
54+
<TextField
55+
label="Title"
56+
value="Artisanal Wooden Spoon"
57+
onChange={() => {}}
58+
/>
59+
<TextField label="Description" multiline onChange={() => {}} />
5660
</FormLayout>
5761
</Card>
5862
```

0 commit comments

Comments
 (0)