UNPKG

@ark-ui/react

Version:

A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.

18 lines (15 loc) 740 B
'use client'; import { jsx } from 'react/jsx-runtime'; import { mergeProps } from '@zag-js/react'; import { forwardRef } from 'react'; import { ark } from '../factory.js'; import { useFieldContext } from '../field/use-field-context.js'; import { useColorPickerContext } from './use-color-picker-context.js'; const ColorPickerHiddenInput = forwardRef((props, ref) => { const colorPicker = useColorPickerContext(); const mergedProps = mergeProps(colorPicker.getHiddenInputProps(), props); const field = useFieldContext(); return /* @__PURE__ */ jsx(ark.input, { "aria-describedby": field?.ariaDescribedby, ...mergedProps, ref }); }); ColorPickerHiddenInput.displayName = "ColorPickerHiddenInput"; export { ColorPickerHiddenInput };