-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(web-twig): Don't render the
name
attribute of Checkbox
when e…
…mpty
- Loading branch information
1 parent
fe61e86
commit cfece12
Showing
5 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 48 additions & 2 deletions
50
...es/web-twig/src/Resources/components/Checkbox/__tests__/__fixtures__/checkboxDefault.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,49 @@ | ||
{% set inputProps = { "data-validate": "true" } %} | ||
<Checkbox /> | ||
|
||
<!-- Render with minimum props --> | ||
<Checkbox | ||
id="example-id" | ||
label="Example label" | ||
/> | ||
|
||
<!-- Render checked --> | ||
<Checkbox | ||
id="example-id" | ||
isChecked | ||
label="Example label" | ||
/> | ||
|
||
<Checkbox id="example" name="example" isRequired isChecked validationState="danger" validationText="validation failed" inputProps={ inputProps } /> | ||
<!-- Render with helper text --> | ||
<Checkbox | ||
id="example-id" | ||
label="Example label" | ||
helperText="Example helper text" | ||
/> | ||
|
||
<!-- Render with hidden label --> | ||
<Checkbox | ||
id="example-id" | ||
isLabelHidden | ||
label="Example label" | ||
/> | ||
|
||
<!-- Render with all props --> | ||
{% set inputProps = { "data-validate": "true" } %} | ||
<Checkbox | ||
helperText="Example helper text" | ||
id="example-id" | ||
inputProps={ inputProps } | ||
isChecked | ||
isDisabled | ||
isItem | ||
isLabelHidden | ||
isRequired | ||
label="Example label" | ||
name="example-name" | ||
UNSAFE_helperText="UNSAFE helper text" | ||
UNSAFE_label="UNSAFE label" | ||
UNSAFE_validationState="UNSAFE validation state" | ||
validationState="danger" | ||
validationText="Example validation text" | ||
value="example value" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters