Skip to content

Commit d4f6cc9

Browse files
authored
Merge pull request #93 from chenz24/hotfix/export-error
fix: build error
2 parents 775dead + 0cff4d4 commit d4f6cc9

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.changeset/chatty-penguins-sneeze.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@kubed/components': patch
3+
---
4+
5+
- fix: build error cause by Select export.

packages/components/src/AutoComplete/AutoComplete.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import * as React from 'react';
22
import omit from 'rc-util/lib/omit';
33
import toArray from '../utils/toArray';
44

5-
import Select, { InternalSelectProps, OptionType, RefSelectProps } from '../Select/Select';
5+
import Select, { OptionType, RefSelectProps } from '../Select/Select';
6+
import { InternalSelectProps } from '../Select/Select.styles';
67

78
const { Option } = Select;
89

@@ -26,7 +27,7 @@ function isSelectOptionOrSelectOptGroup(child: any): Boolean {
2627
}
2728

2829
export const AutoComplete: React.ForwardRefRenderFunction<RefSelectProps, AutoCompleteProps> = (
29-
props///<reference path=""/>
30+
props
3031
) => {
3132
// eslint-disable-next-line react/prop-types
3233
const { prefixCls, children, options } = props;

packages/components/src/Select/Select.tsx

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// https://github.dev/ant-design/ant-design/blob/756dc8f130547277a28548c5b46658ff46f131f9/components/select/index.tsx
22
import React from 'react';
3-
import { Option as SelectOption, OptGroup as SelectOptGroup } from 'rc-select';
4-
import { OptionProps } from 'rc-select/lib/Option';
3+
import { Option, OptGroup } from 'rc-select';
54
import forwardRef from '../utils/forwardRef';
65
import getIcons from './iconUtil';
76
import {
@@ -14,10 +13,7 @@ import {
1413

1514
type RawValue = string | number;
1615

17-
// @ts-ignore
18-
export { OptionProps, InternalSelectProps };
19-
20-
export type OptionType = typeof SelectOption;
16+
export type OptionType = typeof Option;
2117

2218
export interface LabeledValue {
2319
key?: string;
@@ -97,7 +93,7 @@ const InternalSelect = forwardRef<SelectProps<any>, 'div'>(
9793
notFoundContent={mergedNotFound}
9894
getPopupContainer={getPopupContainer}
9995
prefixCls="kubed-select"
100-
bordered={bordered}
96+
$bordered={bordered}
10197
/>
10298
</>
10399
);
@@ -108,17 +104,15 @@ type InternalSelectType = typeof InternalSelect;
108104

109105
interface SelectInterface extends InternalSelectType {
110106
SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
111-
Option: typeof SelectOption;
112-
OptGroup: typeof SelectOptGroup;
107+
Option: typeof Option;
108+
OptGroup: typeof OptGroup;
113109
}
114110

115111
const Select = InternalSelect as SelectInterface;
116112

117113
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
118-
119-
Select.Option = SelectOption;
120-
121-
Select.OptGroup = SelectOptGroup;
114+
Select.Option = Option;
115+
Select.OptGroup = OptGroup;
122116

123117
Select.displayName = '@kubed/components/Select';
124118

packages/components/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ export { default as DatePicker } from './DatePicker/DatePicker';
3636
export { default as TimePicker } from './TimePicker/TimePicker';
3737
export { Banner, BannerTip } from './Banner/Banner';
3838
export { Notify, notify } from './Notify/Notify';
39-
// export { AutoComplete } from './AutoComplete/AutoComplete';
40-
// export { Slider } from './Slider/Slider';

0 commit comments

Comments
 (0)