@ark-ui/react
Version:
A collection of unstyled, accessible UI components for React, utilizing state machines for seamless interaction.
30 lines (29 loc) • 1.18 kB
TypeScript
import { DateValue } from '@zag-js/date-picker';
import { Assign } from '../../types';
import { HTMLProps, PolymorphicProps } from '../factory';
import { ForwardRefExoticComponent, RefAttributes } from 'react';
export interface DatePickerValueTextRenderProps {
value: DateValue;
index: number;
valueAsString: string;
remove: () => void;
}
export interface DatePickerValueTextBaseProps extends PolymorphicProps {
/**
* Text to display when no date is selected.
*/
placeholder?: string | undefined;
/**
* A function to render each selected date value.
* When provided, each date in the selection will be rendered using this function.
*/
children?: ((props: DatePickerValueTextRenderProps) => React.ReactNode) | undefined;
/**
* The separator to use between multiple date values when using default rendering.
* @default ", "
*/
separator?: string | undefined;
}
export interface DatePickerValueTextProps extends Assign<HTMLProps<'span'>, DatePickerValueTextBaseProps> {
}
export declare const DatePickerValueText: ForwardRefExoticComponent<DatePickerValueTextProps & RefAttributes<HTMLSpanElement>>;