Skip to content

Commit

Permalink
Fixes Selector label wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
tareqlol committed Sep 25, 2023
1 parent 89de9db commit cc49ae6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/circuit-ui/components/Selector/Selector.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
height: 100%;
color: var(--cui-fg-normal);
text-align: center;
white-space: nowrap;
cursor: pointer;
background-color: var(--cui-bg-normal);
border-radius: var(--cui-border-radius-byte);
Expand Down Expand Up @@ -100,6 +101,7 @@
text-align: start;
}


/* Sizes */

.kilo {
Expand All @@ -118,6 +120,10 @@
font-weight: var(--cui-font-weight-bold);
}

.description {
white-space: initial;
}

.icon {
margin-bottom: var(--cui-spacings-bit);
}
4 changes: 3 additions & 1 deletion packages/circuit-ui/components/Selector/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ export const Selector = forwardRef<HTMLInputElement, SelectorProps>(
{hasDescription ? (
<Fragment>
<span className={classes.title}>{label || children}</span>
<span aria-hidden="true">{description}</span>
<span className={classes.description} aria-hidden="true">
{description}
</span>
</Fragment>
) : (
label || children
Expand Down

0 comments on commit cc49ae6

Please sign in to comment.