Skip to content

Commit

Permalink
add disabled styling for inlineLabelText
Browse files Browse the repository at this point in the history
  • Loading branch information
jorycunningham committed Jun 27, 2024
1 parent 74665a1 commit 855d161
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default function () {
</div>
<div className={styles['select-filter']}>
<Select
disabled={true}
data-testid="state-filter"
inlineLabelText="Filtrar secuencias de registros por nombre"
options={stateOptions}
Expand Down
8 changes: 8 additions & 0 deletions src/select/parts/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,12 @@ $checkbox-size: awsui.$size-control;
);
background-position: bottom;
z-index: 1;

&.inline-label-disabled {
background-image: linear-gradient(
to bottom,
transparent calc(100% - (styles.$control-border-width + 3px)),
awsui.$color-background-input-disabled 1px
);
}
}
5 changes: 4 additions & 1 deletion src/select/parts/trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ const Trigger = React.forwardRef(
<>
{inlineLabelText ? (
<div className={styles['inline-label-wrapper']}>
<label htmlFor={controlId} className={styles['inline-label']}>
<label
htmlFor={controlId}
className={clsx(styles['inline-label'], disabled && styles['inline-label-disabled'])}
>
{inlineLabelText}
</label>
<div className={styles['inline-label-trigger-wrapper']}>{triggerButton}</div>
Expand Down

0 comments on commit 855d161

Please sign in to comment.