Skip to content

Commit

Permalink
fix: make interactive states work for CSS form components
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Oct 21, 2021
1 parent 7dfdc55 commit 0a71c46
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/checkbox/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const defaultArgs = {
export const Checkbox = ({ checked = false, disabled = false }) =>
`<input type="checkbox"${checked ? ' checked' : ''}${disabled ? ' disabled' : ''} class="${clsx(
'utrecht-checkbox',
'utrecht-checkbox--html-input',
checked && 'utrecht-checkbox--checked',
disabled && 'utrecht-checkbox--disabled',
)}">`;
1 change: 1 addition & 0 deletions components/radio-button/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const defaultArgs = {
export const RadioButton = ({ checked = false, disabled = false }) =>
`<input type="radio"${checked ? ' checked' : ''}${disabled ? ' disabled' : ''} class="${clsx(
'utrecht-radio-button',
'utrecht-radio-button--html-input',
checked && 'utrecht-radio-button--checked',
disabled && 'utrecht-radio-button--disabled',
)}">`;
2 changes: 1 addition & 1 deletion components/select/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const defaultArgs = {
export const Select = ({ disabled = false, focus = false, invalid = false, options = [], required = false }) =>
`<select${invalid ? ' aria-invalid="true"' : ''}${disabled ? ' disabled' : ''}${
required ? ' required' : ''
} class="${clsx('utrecht-select', {
} class="${clsx('utrecht-select', 'utrecht-select--html-select', {
'utrecht-select--disabled': disabled,
'utrecht-select--focus': focus,
'utrecht-select--focus-visible': focus,
Expand Down
1 change: 1 addition & 0 deletions components/textarea/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const TextArea = ({
}) =>
`<textarea class="${clsx(
'utrecht-textarea',
'utrecht-textarea--html-textarea',
disabled && 'utrecht-textarea--disabled',
focus && 'utrecht-textarea--focus utrecht-textarea--focus-visible',
hover && 'utrecht-textarea--hover',
Expand Down
1 change: 1 addition & 0 deletions components/textbox/bem.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const TextBox = ({
}) =>
`<input class="${clsx(
'utrecht-textbox',
'utrecht-textbox--html-input',
disabled && 'utrecht-textbox--disabled',
focus && 'utrecht-textbox--focus utrecht-textbox--focus-visible',
invalid && 'utrecht-textbox--invalid',
Expand Down

0 comments on commit 0a71c46

Please sign in to comment.