Commit cafc0b6
committed
Document that nested box fields in
Adds a "Nested Fields Labels" section to the `FormLayout` README explaining
that `TextField`, `TextArea`, `SelectField`, and `FileInputField` nested
inside `FormLayoutCustomField` must use `isLabelVisible={false}`, because
`FormLayout` forces horizontal layout on all descendants and a visible label
would conflict with the grid.
Updates the story and tests to follow this rule: removes prop test cases that
used visible labels on nested fields, adds `isLabelVisible={false}` to the
non-visual tests, and applies the same fix to the story component. Also adds
`Button` to the story and renames the `30px` custom label width test case to
the more representative `100px`.FormLayoutCustomField must hide their labels1 parent 855bf12 commit cafc0b6
19 files changed
Lines changed: 42 additions & 28 deletions
File tree
- src/components/FormLayout
- __tests__
- FormLayout.spec.tsx-snapshots
- FormLayoutCustomField.spec.tsx-snapshots
- _propTests
- customFieldTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
333 | 357 | | |
334 | 358 | | |
335 | 359 | | |
| |||
0 commit comments