UNPKG

1.12 kBTypeScriptView Raw
1/** @jsx jsx */
2import { ReactNode } from 'react';
3import { jsx } from '@emotion/react';
4import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
5export interface SingleValueProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
6 /** The children to be rendered. */
7 children: ReactNode;
8 /** The data of the selected option rendered in the Single Value component. */
9 data: Option;
10 /** Props passed to the wrapping element for the group. */
11 innerProps: JSX.IntrinsicElements['div'];
12 /** Whether this is disabled. */
13 isDisabled: boolean;
14}
15export declare const css: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, theme: { spacing, colors }, }: SingleValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
16declare const SingleValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => jsx.JSX.Element;
17export default SingleValue;