Skip to content

Commit

Permalink
Fix visual inconsistencies between disabled input components (#276)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Beceic <[email protected]>
  • Loading branch information
fbeceic and Felix Beceic authored Oct 10, 2024
1 parent 2163d40 commit 5109250
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions libs/selectors/src/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ function Autocomplete<T extends {}>({
const selectClassName = cx(
autocompleteTokens.Select.base,
{ [autocompleteTokens.Select.active]: !disabled },
{ [autocompleteTokens.Select.disabled]: disabled },
{ "pt-2.5": tags && tagsContained && !value },
);

Expand Down
7 changes: 4 additions & 3 deletions libs/theme/src/defaultTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const defaultComponentConfig = {
Select: {
base: "-m-2 pl-2 flex flex-col",
active: "pointer-events-auto cursor-pointer hover:text-slate-700 ",
disabled: "opacity-50",
},
Separator: {
container: "pl-2",
Expand Down Expand Up @@ -1013,7 +1014,7 @@ const defaultComponentConfig = {
autocomplete: "py-2 pl-3 pr-20",
},
boxShadow: `focus-within:ring focus-within:outline-none focus-within:ring-primary-light`,
disabled: "opacity-50",
disabled: "opacity-50 bg-slate-100",
addOn: {
master: "flex-1 block",
padding: "py-2 px-3",
Expand Down Expand Up @@ -1444,7 +1445,7 @@ const defaultComponentConfig = {
fontSize: "sm:text-sm",
lineHeight: "sm:leading-5",
error: `border border-danger text-danger-dark placeholder-danger focus:ring focus:border-danger-300 focus:ring-danger-light`,
disabled: "opacity-50",
disabled: "opacity-50 bg-slate-100",
input: "absolute w-0 h-0",
},
container: "relative w-full",
Expand Down Expand Up @@ -1701,7 +1702,7 @@ const defaultComponentConfig = {
color: "text-danger",
},
},
disabled: "opacity-50",
disabled: "opacity-50 bg-slate-100",
},
TimePicker: {
container: "w-full flex flex-col items-center justify-center bg-white shadow p-2 left-0",
Expand Down

0 comments on commit 5109250

Please sign in to comment.