Skip to content

Commit 120980c

Browse files
authored
feat(components): export multiple components props (#5353)
1 parent a2ecd5f commit 120980c

File tree

28 files changed

+28
-28
lines changed

28 files changed

+28
-28
lines changed

components/affix/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface AffixState {
4141
}
4242

4343
// Affix
44-
const affixProps = {
44+
export const affixProps = {
4545
/**
4646
* 距离窗口顶部达到指定偏移量后触发
4747
*/

components/anchor/AnchorLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import classNames from '../_util/classNames';
66
import useConfigInject from '../_util/hooks/useConfigInject';
77
import { useInjectAnchor } from './context';
88

9-
const anchorLinkProps = {
9+
export const anchorLinkProps = {
1010
prefixCls: PropTypes.string,
1111
href: PropTypes.string.def('#'),
1212
title: PropTypes.any,

components/auto-complete/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function isSelectOptionOrSelectOptGroup(child: any): boolean {
1313
return child?.type?.isSelectOption || child?.type?.isSelectOptGroup;
1414
}
1515

16-
const autoCompleteProps = {
16+
export const autoCompleteProps = {
1717
...omit(selectProps(), ['loading', 'mode', 'optionLabelProp', 'labelInValue']),
1818
dataSource: PropTypes.array,
1919
dropdownMenuStyle: PropTypes.style,

components/badge/Ribbon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { defineComponent, computed } from 'vue';
77
import PropTypes from '../_util/vue-types';
88
import useConfigInject from '../_util/hooks/useConfigInject';
99

10-
const ribbonProps = {
10+
export const ribbonProps = {
1111
prefix: PropTypes.string,
1212
color: { type: String as PropType<LiteralUnion<PresetColorType, string>> },
1313
text: PropTypes.any,

components/breadcrumb/Breadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface Route {
1414
children?: Omit<Route, 'children'>[];
1515
}
1616

17-
const breadcrumbProps = {
17+
export const breadcrumbProps = {
1818
prefixCls: PropTypes.string,
1919
routes: { type: Array as PropType<Route[]> },
2020
params: PropTypes.any,

components/breadcrumb/BreadcrumbItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import DropDown from '../dropdown/dropdown';
66
import DownOutlined from '@ant-design/icons-vue/DownOutlined';
77
import useConfigInject from '../_util/hooks/useConfigInject';
88

9-
const breadcrumbItemProps = {
9+
export const breadcrumbItemProps = {
1010
prefixCls: PropTypes.string,
1111
href: PropTypes.string,
1212
separator: PropTypes.any,

components/breadcrumb/BreadcrumbSeparator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from '../_util/vue-types';
44
import { flattenChildren } from '../_util/props-util';
55
import useConfigInject from '../_util/hooks/useConfigInject';
66

7-
const breadcrumbSeparatorProps = {
7+
export const breadcrumbSeparatorProps = {
88
prefixCls: PropTypes.string,
99
};
1010
export type BreadcrumbSeparatorProps = Partial<ExtractPropTypes<typeof breadcrumbSeparatorProps>>;

components/button/buttonTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function convertLegacyProps(type?: LegacyButtonType): ButtonProps {
2020
return { type };
2121
}
2222

23-
const buttonProps = () => ({
23+
export const buttonProps = () => ({
2424
prefixCls: PropTypes.string,
2525
type: PropTypes.oneOf(ButtonTypes),
2626
htmlType: PropTypes.oneOf(ButtonHTMLTypes).def('button'),

components/card/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type CardSize = 'default' | 'small';
2323

2424
const { TabPane } = Tabs;
2525

26-
const cardProps = () => ({
26+
export const cardProps = () => ({
2727
prefixCls: PropTypes.string,
2828
title: PropTypes.any,
2929
extra: PropTypes.any,

components/descriptions/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function getRows(children: VNode[], column: number) {
128128
return rows;
129129
}
130130

131-
const descriptionsProps = {
131+
export const descriptionsProps = {
132132
prefixCls: PropTypes.string,
133133
bordered: PropTypes.looseBool,
134134
size: PropTypes.oneOf(tuple('default', 'middle', 'small')).def('default'),

0 commit comments

Comments
 (0)