Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/tailwind-config/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@
--text-caption-xs-bold--font-weight: var(--font-weight-bold);
}

@utility h-header {
height: 3.25rem;
}

@utility px-page-x {
padding-left: 1.35rem;
padding-right: 1.35rem;
Expand Down
28 changes: 14 additions & 14 deletions packages/ui/src/button/toggle-switch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Switch } from "@headlessui/react";
import * as React from "react";
// helpers
import { cn } from "../utils";

Expand All @@ -21,12 +20,14 @@ function ToggleSwitch(props: IToggleSwitchProps) {
disabled={disabled}
onChange={onChange}
className={cn(
"relative inline-flex flex-shrink-0 h-6 w-10 cursor-pointer rounded-full border border-subtle transition-colors duration-200 ease-in-out focus:outline-none bg-gray-700",
"relative inline-flex flex-shrink-0 h-6 w-10 cursor-pointer rounded-full border-0 transition-colors duration-200 ease-in-out focus:outline-none",
{
"h-4 w-6": size === "sm",
"h-5 w-8": size === "md",
"bg-accent-primary": value,
"cursor-not-allowed bg-layer-1": disabled,
"h-4 w-7": size === "sm",
"h-5 w-9": size === "md",
"bg-accent-primary": value && !disabled,
"bg-(--text-color-icon-placeholder)": !value && !disabled,
"cursor-not-allowed opacity-50 bg-accent-primary": value && disabled,
"cursor-not-allowed opacity-50 bg-(--text-color-icon-placeholder)": !value && disabled,
},
className
)}
Expand All @@ -35,15 +36,14 @@ function ToggleSwitch(props: IToggleSwitchProps) {
<span
aria-hidden="true"
className={cn(
"inline-block self-center h-4 w-4 transform rounded-full shadow ring-0 transition duration-200 ease-in-out",
"inline-block self-center h-5 w-5 transform rounded-full bg-(--text-color-icon-on-color) ring-0 transition duration-200 ease-in-out",
{
"translate-x-5 bg-white": value,
"h-2 w-2": size === "sm",
"h-3 w-3": size === "md",
"translate-x-3": value && size === "sm",
"translate-x-4": value && size === "md",
"translate-x-0.5 bg-surface-2": !value,
"cursor-not-allowed bg-surface-2": disabled,
"h-3 w-3 translate-x-3.5": size === "sm" && value,
"h-3 w-3 translate-x-0.5": size === "sm" && !value,
"h-4 w-4 translate-x-4": size === "md" && value,
"h-4 w-4 translate-x-0.5": size === "md" && !value,
"translate-x-4": size === "lg" && value,
"translate-x-0.5": size === "lg" && !value,
}
)}
/>
Expand Down