@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 645 B
JavaScript
"use client";import*as t from"react";import r from"classnames";import*as e from"@radix-ui/react-switch";import{switchPropDefs as h}from"./switch.props.js";import{extractProps as n}from"../helpers/index.js";import{marginPropDefs as f}from"../props/index.js";const i=t.forwardRef((o,s)=>{const{className:p,color:c,radius:m,...a}=n(o,h,f);return t.createElement(e.Root,{"data-accent-color":c,"data-radius":m,...a,asChild:!1,ref:s,className:r("rt-reset","rt-SwitchRoot",p)},t.createElement(e.Thumb,{className:r("rt-SwitchThumb",{"rt-high-contrast":o.highContrast})}))});i.displayName="Switch";export{i as Switch};
//# sourceMappingURL=switch.js.map