Skip to content

Commit

Permalink
feat(Select): add support for label prop (#1837)
Browse files Browse the repository at this point in the history
- provide a cleaner API for implementing the label similar to other form fields
- add disabled prop should a user want to still detach and use Select.Label
- update styles to support this
- docs: clean up all Select stories and API table in storybook
- docs: greatly simplify the presentation of Select documentation
- update relevant snapshots
  • Loading branch information
booc0mtaco authored Jan 26, 2024
1 parent 3fc3354 commit c032ff2
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 439 deletions.
6 changes: 6 additions & 0 deletions src/components/Select/Select.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@

/**
* Compact variant.
* TODO: remove treatment for compact, as it only adjusts the component width, not its overall padding
*/
.select--compact {
width: min-content;
}

.select-button--compact {
padding: var(--eds-size-half);
}
Expand All @@ -29,6 +31,10 @@
display: inline-block;
}

.select__label--disabled {
color: var(--eds-theme-color-text-disabled);
}

/**
* Wraps the Label and the optional/required indicator.
*/
Expand Down
Loading

0 comments on commit c032ff2

Please sign in to comment.