UNPKG

@radix-ui/themes

Version:

[![Radix Themes Logo](https://radix-ui.com/social/themes.png)](https://radix-ui.com/themes)

3 lines (2 loc) 872 B
"use client";import*as e from"react";import s from"classnames";import*as i from"@radix-ui/react-slider";import{sliderPropDefs as f}from"./slider.props.js";import{extractProps as P}from"../helpers/index.js";import{marginPropDefs as c}from"../props/index.js";const a=e.forwardRef((o,d)=>{const{className:l,color:p,radius:m,tabIndex:t,...r}=P(o,f,c);return e.createElement(i.Root,{"data-accent-color":p,"data-radius":m,ref:d,...r,asChild:!1,className:s("rt-SliderRoot",l)},e.createElement(i.Track,{className:"rt-SliderTrack"},e.createElement(i.Range,{className:s("rt-SliderRange",{"rt-high-contrast":o.highContrast}),"data-inverted":r.inverted?"":void 0})),(r.value??r.defaultValue??[]).map((S,n)=>e.createElement(i.Thumb,{key:n,className:"rt-SliderThumb",...t!==void 0?{tabIndex:t}:void 0})))});a.displayName="Slider";export{a as Slider}; //# sourceMappingURL=slider.js.map