mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
* Initial * Handle owner leaving * Remove old team queries * Progress * Retire old toggle * e2e tests * Divide loaders/actions of team pages
23 lines
526 B
TypeScript
23 lines
526 B
TypeScript
import clsx from "clsx";
|
|
import {
|
|
Switch as ReactAriaSwitch,
|
|
type SwitchProps as ReactAriaSwitchProps,
|
|
} from "react-aria-components";
|
|
|
|
interface SendouSwitchProps extends ReactAriaSwitchProps {
|
|
children?: React.ReactNode;
|
|
size?: "small" | "medium";
|
|
}
|
|
|
|
export function SendouSwitch({ children, size, ...rest }: SendouSwitchProps) {
|
|
return (
|
|
<ReactAriaSwitch
|
|
{...rest}
|
|
className={clsx("react-aria-Switch", { small: size === "small" })}
|
|
>
|
|
<div className="indicator" />
|
|
{children}
|
|
</ReactAriaSwitch>
|
|
);
|
|
}
|