-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updates stories to cover all states
- Adds sass variables for the extra states on checkboxes & radios - All stories now include labels
- Loading branch information
1 parent
692dd5f
commit 5cebeb0
Showing
14 changed files
with
423 additions
and
397 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
export default ({ children, htmlFor = null, ariaInvalid = false }) => { | ||
export default ({ | ||
children, | ||
htmlFor = null, | ||
ariaInvalid = false, | ||
classnames = [], | ||
}) => { | ||
const label = document.createElement('label'); | ||
children.forEach((child) => { | ||
label.append(child); | ||
}); | ||
if (ariaInvalid) label.setAttribute('aria-invalid', ariaInvalid); | ||
if (htmlFor) label.setAttribute('for', htmlFor); | ||
classnames.forEach((classname) => label.classList.add(classname)); | ||
return label; | ||
}; |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.