1 | import type { SegmentedLabeledOption as RcSegmentedLabeledOption, SegmentedProps as RCSegmentedProps, SegmentedValue as RcSegmentedValue, SegmentedRawOption } from 'rc-segmented';
|
2 | import * as React from 'react';
|
3 | import type { SizeType } from '../config-provider/SizeContext';
|
4 | export type { SegmentedValue } from 'rc-segmented';
|
5 | interface SegmentedLabeledOptionWithoutIcon<ValueType = RcSegmentedValue> extends RcSegmentedLabeledOption<ValueType> {
|
6 | label: RcSegmentedLabeledOption['label'];
|
7 | }
|
8 | interface SegmentedLabeledOptionWithIcon<ValueType = RcSegmentedValue> extends Omit<RcSegmentedLabeledOption<ValueType>, 'label'> {
|
9 | label?: RcSegmentedLabeledOption['label'];
|
10 |
|
11 | icon: React.ReactNode;
|
12 | }
|
13 | export type SegmentedLabeledOption<ValueType = RcSegmentedValue> = SegmentedLabeledOptionWithIcon<ValueType> | SegmentedLabeledOptionWithoutIcon<ValueType>;
|
14 | export type SegmentedOptions<T = SegmentedRawOption> = (T | SegmentedLabeledOption<T>)[];
|
15 | export interface SegmentedProps<ValueType = RcSegmentedValue> extends Omit<RCSegmentedProps<ValueType>, 'size' | 'options'> {
|
16 | rootClassName?: string;
|
17 | options: SegmentedOptions<ValueType>;
|
18 |
|
19 | block?: boolean;
|
20 |
|
21 | size?: SizeType;
|
22 | }
|
23 | declare const InternalSegmented: React.ForwardRefExoticComponent<Omit<SegmentedProps<RcSegmentedValue>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
24 | declare const Segmented: (<ValueType>(props: SegmentedProps<ValueType> & React.RefAttributes<HTMLDivElement>) => ReturnType<typeof InternalSegmented>) & Pick<React.FC<{}>, "displayName">;
|
25 | export default Segmented;
|
26 |
|
\ | No newline at end of file |