@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 1.26 kB
JavaScript
"use client";var S=Object.create;var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var x=(t,o)=>{for(var r in o)s(t,r,{get:o[r],enumerable:!0})},h=(t,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of y(o))!R.call(t,e)&&e!==r&&s(t,e,{get:()=>o[e],enumerable:!(i=d(o,e))||i.enumerable});return t};var p=(t,o,r)=>(r=t!=null?S(u(t)):{},h(o||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),g=t=>h(s({},"__esModule",{value:!0}),t);var C={};x(C,{Switch:()=>a});module.exports=g(C);var c=p(require("react")),m=p(require("classnames")),n=p(require("@radix-ui/react-switch")),f=require("./switch.props.js"),w=require("../helpers/index.js"),P=require("../props/index.js");const a=c.forwardRef((t,o)=>{const{className:r,color:i,radius:e,...l}=(0,w.extractProps)(t,f.switchPropDefs,P.marginPropDefs);return c.createElement(n.Root,{"data-accent-color":i,"data-radius":e,...l,asChild:!1,ref:o,className:(0,m.default)("rt-reset","rt-SwitchRoot",r)},c.createElement(n.Thumb,{className:(0,m.default)("rt-SwitchThumb",{"rt-high-contrast":t.highContrast})}))});a.displayName="Switch";
//# sourceMappingURL=switch.js.map
;