import { Text } from 'react-native'; import type { ZestUIComponentProps } from '../../types'; /** * The label of the currently selected item. * Renders a ``. * * The label comes from `Select.Root`'s `items` prop, falling back to the labels * `Select.ItemText` registers as items mount. Without `items` the label is only * known after the popup has been opened once, since that is when the items first * render. Pass `children` as a function to format it yourself. * * In a `multiple` select there are several labels, so `label` is them joined * with a comma and `labels` holds them individually — a comma is rarely the * right separator, so format from `labels` when it matters. */ export declare function SelectValue(componentProps: SelectValue.Props): import("react").ReactElement>; export interface SelectValueState { /** * The currently selected value. */ value: unknown; /** * The selected item's label, if it is known. In a `multiple` select, every * selected label joined with a comma. */ label: string | undefined; /** * Every selected label, in selection order. Empty when nothing is selected or * no label is known yet. */ labels: string[]; /** * Whether the placeholder is what is being shown, because no label is known. */ placeholder: boolean; } export interface SelectValueProps extends Omit, 'children'> { children?: React.ReactNode | ((state: SelectValueState) => React.ReactNode); /** * Shown while nothing is selected — or while the selected label is not known * yet, which is the case before the popup has been opened once unless * `Select.Root` was given `items`. `children` takes precedence. */ placeholder?: React.ReactNode; } export declare namespace SelectValue { type State = SelectValueState; type Props = SelectValueProps; } //# sourceMappingURL=SelectValue.d.ts.map