mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
import {
|
|
Switch as ReactAriaSwitch,
|
|
type SwitchProps as ReactAriaSwitchProps,
|
|
} from "react-aria-components";
|
|
import styles from "./Switch.module.css";
|
|
|
|
interface SendouSwitchProps extends ReactAriaSwitchProps {
|
|
children?: React.ReactNode;
|
|
}
|
|
|
|
export function SendouSwitch({ children, ...rest }: SendouSwitchProps) {
|
|
return (
|
|
<ReactAriaSwitch {...rest} className={styles.root}>
|
|
<div className={styles.indicator} />
|
|
{children}
|
|
</ReactAriaSwitch>
|
|
);
|
|
}
|