Skip to content

Commit

Permalink
Docs(web-react, web-twig): Add isFluid to the API documentations of…
Browse files Browse the repository at this point in the history
… `FieldGroup`
  • Loading branch information
dlouhak authored and literat committed Feb 15, 2024
1 parent 59fc8a2 commit 7e69912
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
25 changes: 13 additions & 12 deletions packages/web-react/src/components/FieldGroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,19 @@ Validation states can be presented either by adding the `validationState` attrib

## API

| Name | Type | Default | Required | Description |
| ----------------- | ---------------------------------------------- | ------- | -------- | ---------------------------------------- |
| `form` | `string` | `null` || Parent form ID |
| `helperText` | `string` | `null` || Custom helper text |
| `id` | `string` ||| Group and label identification |
| `isDisabled` | `bool` | `false` || If true, the group is disabled |
| `isLabelHidden` | `bool` | `false` || If true, label is hidden |
| `isRequired` | `bool` | `false` || If true, the group is marked as required |
| `label` | `string` ||| Label text |
| `name` | `string` | `null` || Group name |
| `validationState` | [Validation dictionary][dictionary-validation] | `null` || Type of validation state |
| `validationText` | [`string` \| `string[]`] | `null` || Validation text |
| Name | Type | Default | Required | Description |
| ----------------- | ---------------------------------------------- | ------- | -------- | ---------------------------------------------------------- |
| `form` | `string` | `null` || Parent form ID |
| `helperText` | `string` | `null` || Custom helper text |
| `id` | `string` ||| Group and label identification |
| `isDisabled` | `bool` | `false` || If true, the group is disabled |
| `isFluid` | `bool` ||| If true, the element spans to the full width of its parent |
| `isLabelHidden` | `bool` | `false` || If true, label is hidden |
| `isRequired` | `bool` | `false` || If true, the group is marked as required |
| `label` | `string` ||| Label text |
| `name` | `string` | `null` || Group name |
| `validationState` | [Validation dictionary][dictionary-validation] | `null` || Type of validation state |
| `validationText` | [`string` \| `string[]`] | `null` || Validation text |

On top of the API options, the components accept [additional attributes][readme-additional-attributes].
If you need more control over the styling of a component, you can use [style props][readme-style-props]
Expand Down
31 changes: 16 additions & 15 deletions packages/web-twig/src/Resources/components/FieldGroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,22 @@ When validated on server:

## API

| Name | Type | Default | Required | Description |
| ----------------------- | ---------------------------------------------- | ------- | -------- | ------------------------------------------ |
| `form` | `string` | `null` || Parent form ID |
| `helperText` | `string` | `null` |\*\* | Custom helper text |
| `id` | `string` ||| Group and label identification |
| `isDisabled` | `bool` | `false` || If true, the group is disabled |
| `isLabelHidden` | `bool` | `false` || If true, label is hidden |
| `isRequired` | `bool` | `false` || If true, the group is marked as required |
| `label` | `string` | `null` |\* | Label text |
| `name` | `string` | `null` || Group name |
| `UNSAFE_helperText` | `string` | `null` |\*\* | Unescaped custom helper text (allows HTML) |
| `UNSAFE_label` | `string` | `null` |\* | Unescaped label text (allows HTML) |
| `UNSAFE_validationText` | [`string` \| `string[]`] | `null` |\*\* | Unescaped validation text (allows HTML) |
| `validationState` | [Validation dictionary][dictionary-validation] | `null` || Type of validation state |
| `validationText` | [`string` \| `string[]`] | `null` |\*\* | Validation text |
| Name | Type | Default | Required | Description |
| ----------------------- | ---------------------------------------------- | ------- | -------- | ---------------------------------------------------------- |
| `form` | `string` | `null` || Parent form ID |
| `helperText` | `string` | `null` |\*\* | Custom helper text |
| `id` | `string` ||| Group and label identification |
| `isDisabled` | `bool` | `false` || If true, the group is disabled |
| `isFluid` | `bool` | `false` || If true, the element spans to the full width of its parent |
| `isLabelHidden` | `bool` | `false` || If true, label is hidden |
| `isRequired` | `bool` | `false` || If true, the group is marked as required |
| `label` | `string` | `null` |\* | Label text |
| `name` | `string` | `null` || Group name |
| `UNSAFE_helperText` | `string` | `null` |\*\* | Unescaped custom helper text (allows HTML) |
| `UNSAFE_label` | `string` | `null` |\* | Unescaped label text (allows HTML) |
| `UNSAFE_validationText` | [`string` \| `string[]`] | `null` |\*\* | Unescaped validation text (allows HTML) |
| `validationState` | [Validation dictionary][dictionary-validation] | `null` || Type of validation state |
| `validationText` | [`string` \| `string[]`] | `null` |\*\* | Validation text |

(\*) To keep the component accessible, a label is always required. You can use the `label` for simple text or `UNSAFE_label` for HTML content.
(\*\*) Props with and without `UNSAFE_` prefix are mutually exclusive.
Expand Down

0 comments on commit 7e69912

Please sign in to comment.