Skip to content

Commit

Permalink
fix: border color dark
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Oct 23, 2023
1 parent a764308 commit f408fd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/components/input-elements/Switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,13 @@ const Switch = React.forwardRef<HTMLDivElement, SwitchProps>((props, ref) => {
<span className={tremorTwMerge(makeSwitchClassName("sr-only"), "sr-only")}>
Switch {isChecked ? "on" : "off"}
</span>
{/* <span
aria-hidden="true"
className={tremorTwMerge(
makeSwitchClassName("background"),
"pointer-events-none absolute h-full w-full rounded-md bg-white",
)}
/> */}
<span
aria-hidden="true"
className={tremorTwMerge(
makeSwitchClassName("background"),
isChecked
? getColorClassNames(color, colorPalette.background).bgColor
: "bg-tremor-content-subtle dark:bg-dark-tremor-content-subtle",
: "bg-tremor-border dark:bg-dark-tremor-border",
"pointer-events-none absolute mx-auto h-3.5 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out",
)}
/>
Expand All @@ -103,7 +96,7 @@ const Switch = React.forwardRef<HTMLDivElement, SwitchProps>((props, ref) => {
getColorClassNames(color, colorPalette.background).bgColor,
"translate-x-5 border-white",
)
: "translate-x-0 bg-tremor-content-subtle dark:bg-dark-tremor-content-subtle border-white",
: "translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-white",

"pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",
isFocused ? tremorTwMerge("ring-2 ring-blue-200") : "",
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = {
emphasis: "#d1d5db", // gray-300
},
border: {
DEFAULT: "#1f2937", // gray-800
DEFAULT: "#374151", // gray-700
},
ring: {
DEFAULT: "#1f2937", // gray-800
Expand Down

0 comments on commit f408fd9

Please sign in to comment.