mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
type: update React.AriaAttributes type (#53562)
This commit is contained in:
@@ -15,7 +15,7 @@ import useStyle from './style';
|
||||
import useItemRender from './useItemRender';
|
||||
import useItems from './useItems';
|
||||
|
||||
export interface BreadcrumbItemType {
|
||||
export interface BreadcrumbItemType extends React.AriaAttributes {
|
||||
key?: React.Key;
|
||||
/**
|
||||
* Different with `path`. Directly set the link of this item.
|
||||
@@ -38,8 +38,8 @@ export interface BreadcrumbItemType {
|
||||
/** @deprecated Please use `menu` instead */
|
||||
children?: Omit<BreadcrumbItemType, 'children'>[];
|
||||
[key: `data-${string}`]: string;
|
||||
[key: `aria-${string}`]: string;
|
||||
}
|
||||
|
||||
export interface BreadcrumbSeparatorType {
|
||||
type: 'separator';
|
||||
separator?: React.ReactNode;
|
||||
|
||||
@@ -45,16 +45,17 @@ export interface LabeledValue {
|
||||
export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[];
|
||||
|
||||
export interface TreeSelectProps<ValueType = any, OptionType extends DataNode = DataNode>
|
||||
extends Omit<
|
||||
RcTreeSelectProps<ValueType, OptionType>,
|
||||
| 'showTreeIcon'
|
||||
| 'treeMotion'
|
||||
| 'mode'
|
||||
| 'getInputElement'
|
||||
| 'backfill'
|
||||
| 'treeLine'
|
||||
| 'switcherIcon'
|
||||
> {
|
||||
extends React.AriaAttributes,
|
||||
Omit<
|
||||
RcTreeSelectProps<ValueType, OptionType>,
|
||||
| 'showTreeIcon'
|
||||
| 'treeMotion'
|
||||
| 'mode'
|
||||
| 'getInputElement'
|
||||
| 'backfill'
|
||||
| 'treeLine'
|
||||
| 'switcherIcon'
|
||||
> {
|
||||
suffixIcon?: React.ReactNode;
|
||||
size?: SizeType;
|
||||
disabled?: boolean;
|
||||
@@ -68,7 +69,6 @@ export interface TreeSelectProps<ValueType = any, OptionType extends DataNode =
|
||||
status?: InputStatus;
|
||||
switcherIcon?: SwitcherIcon | RcTreeSelectProps<ValueType, OptionType>['switcherIcon'];
|
||||
rootClassName?: string;
|
||||
[key: `aria-${string}`]: React.AriaAttributes[keyof React.AriaAttributes];
|
||||
/** @deprecated Please use `popupMatchSelectWidth` instead */
|
||||
dropdownMatchSelectWidth?: boolean | number;
|
||||
popupMatchSelectWidth?: boolean | number;
|
||||
|
||||
Reference in New Issue
Block a user