Skip to content

Commit

Permalink
fix(FormGroup): forward id to slot
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjoertjuh committed Nov 22, 2023
1 parent e5cbaaf commit ffb0567
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/components/FormGroup/FormGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@

<!--
@slot Displays the input
@binding {string} id The id of the input
@binding {boolean} is-invalid Describes if the input is invalid
@binding {boolean} is-valid Describes if the input is valid
-->
<slot
:id="id"
:is-invalid="isInvalid"
:is-valid="isValid"
>
Expand Down
8 changes: 4 additions & 4 deletions src/components/FormGroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

## Slots

| Name | Description | Bindings |
| ------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| label | Displays content inside the label | **label** `string` - The text of the label |
| default | Displays the input | **is-invalid** `boolean` - Describes if the input is invalid<br/>**is-valid** `boolean` - Describes if the input is valid |
| Name | Description | Bindings |
| ------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| label | Displays content inside the label | **label** `string` - The text of the label |
| default | Displays the input | **id** `string` - The id of the input<br/>**is-invalid** `boolean` - Describes if the input is invalid<br/>**is-valid** `boolean` - Describes if the input is valid |

## Events

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`template renders default 1`] = `
<!--v-if-->
<!--
@slot Displays the input
@binding {string} id The id of the input
@binding {boolean} is-invalid Describes if the input is invalid
@binding {boolean} is-valid Describes if the input is valid
-->
Expand Down

0 comments on commit ffb0567

Please sign in to comment.