Skip to content

Commit

Permalink
Add background-color to highlight being disabled. (#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbrunvoll authored Nov 14, 2024
1 parent 806f1c0 commit 47b62dd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/page-modules/contact/components/form/form.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@
color: var(--static-background-background_2-text);
}

.searchable_select__input_disabled {
cursor: not-allowed;
}

.searchable_select__input::placeholder {
color: var(--text-colors-secondary);
opacity: 1;
Expand All @@ -405,6 +409,10 @@
background-color: transparent;
}

.searchable_select__button:disabled {
cursor: not-allowed;
}

.select__popover,
.searchable_select__popover {
overflow: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
import { MonoIcon } from '@atb/components/icon';
import ErrorMessage from '../error-message';
import style from '../form.module.css';
import { andIf } from '@atb/utils/css';
import {
Key,
Button,
Expand Down Expand Up @@ -91,11 +92,14 @@ export default function SearchableSelect<T>({
onSelectionChange={handleSelectionChange}
className={style.searchable_select__comboBox}
>
<Label>{label}</Label>
<Label className={isDisabled ? style.label_disabled : ''}>{label}</Label>
<Group className={style.searchable_select__group}>
<Input
placeholder={placeholder}
className={style.searchable_select__input}
className={andIf({
[style.searchable_select__input]: true,
[style.searchable_select__input_disabled]: !!isDisabled,
})}
value={inputValue}
onChange={(e) => handleInputChange(e.target.value)}
onFocus={handleFocus}
Expand Down

0 comments on commit 47b62dd

Please sign in to comment.