Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/settings/styled-switch-component.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 625 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/settings/styled-switch-component.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/settings/styled-switch-component.tsx
-
curl -L -o styled-switch-component.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/settings/styled-switch-component.tsx
625 Bytes
| import { cn } from "#/utils/utils"; | |
| interface StyledSwitchComponentProps { | |
| isToggled: boolean; | |
| } | |
| export function StyledSwitchComponent({ | |
| isToggled, | |
| }: StyledSwitchComponentProps) { | |
| return ( | |
| <div | |
| className={cn( | |
| "w-12 h-6 rounded-xl flex items-center p-1.5 cursor-pointer", | |
| isToggled && "justify-end bg-primary", | |
| !isToggled && | |
| "justify-start bg-base-secondary border border-tertiary-light", | |
| )} | |
| > | |
| <div | |
| className={cn( | |
| "w-3 h-3 rounded-xl", | |
| isToggled ? "bg-base-secondary" : "bg-tertiary-light", | |
| )} | |
| /> | |
| </div> | |
| ); | |
| } | |