@nafr/echo-ui
Version:
A UI library born for WAA
30 lines (29 loc) • 1.11 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { cn } from '../../../lib/utils';
import { KnobGroupContextProvider } from './context';
import { knobGroupStyle } from './styles';
export const KnobGroup = forwardRef((props, ref) => {
const { disabled, progressColor, pointerColor, size, trackWidth, trackColor, buttonColor, pointerWidth, pointerHeight, bilateral, sensitivity, rotationRange, step, min, max, classNames, styles, ...restProps } = props;
const contextValue = {
disabled,
progressColor,
pointerColor,
size,
trackWidth,
trackColor,
buttonColor,
pointerWidth,
pointerHeight,
bilateral,
sensitivity,
rotationRange,
step,
min,
max,
classNames,
styles,
...restProps,
};
return (_jsx(KnobGroupContextProvider, { value: contextValue, children: _jsx("div", { ...restProps, ref: ref, className: cn(knobGroupStyle(), restProps.className), style: restProps.style, children: restProps.children }) }));
});