Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ export const ToggleSwitch = forwardRef(function ToggleSwitch(
}: ComponentProps<typeof Box> & AllHTMLAttributes<HTMLInputElement>,
ref: Ref<HTMLInputElement>,
) {
const { is: outerIs = 'label', ...rest } = props;

return (
<Box is='label' className={className} rcx-toggle-switch>
<Box is={outerIs} className={className} rcx-toggle-switch>
<Box
is='input'
ref={ref}
rcx-toggle-switch__input
type='checkbox'
{...props}
{...rest}
/>
<Box is='i' rcx-toggle-switch__fake aria-hidden='true' />
</Box>
Expand Down