Skip to content

Commit

Permalink
fix(Breadcrumb/Progress/Radio): 修改部分组件导出方式 (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunLxy committed Apr 12, 2022
1 parent d11d652 commit 1c26166
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/react-breadcrumb/src/Breadcrumb.tsx
Expand Up @@ -28,3 +28,4 @@ type Breadcrumb = typeof Breadcrumb & {
(Breadcrumb as Breadcrumb).Item = Item;

export default Breadcrumb as Breadcrumb;
export { Breadcrumb };
2 changes: 2 additions & 0 deletions packages/react-progress/src/Circle.tsx
Expand Up @@ -6,6 +6,7 @@ import './style/index.less';
import './style/circle.less';

export type Status = 'success' | 'active' | 'exception';

export interface ProgressCircleProps<T> extends IProps, HTMLDivProps {
type?: IconProps<T>['type'];
status?: Status;
Expand Down Expand Up @@ -95,3 +96,4 @@ export default class Circle<T> extends React.Component<ProgressCircleProps<T>> {
);
}
}
export { Circle };
1 change: 1 addition & 0 deletions packages/react-progress/src/Line.tsx
Expand Up @@ -56,3 +56,4 @@ export default class Line<T> extends React.Component<ProgressLineProp<T>> {
);
}
}
export { Line };
3 changes: 2 additions & 1 deletion packages/react-radio/src/Radio.tsx
Expand Up @@ -4,6 +4,7 @@ import './style/index.less';

export interface RadioProps extends RadioAbstractProps {}

export default React.forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
export const Radio = React.forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
return <RadioAbstract ref={ref} {...props} />;
});
export default Radio;
2 changes: 1 addition & 1 deletion packages/react-radio/src/RadioButton.tsx
Expand Up @@ -13,7 +13,7 @@ export interface RadioButtonProps extends IProps, Omit<HTMLButtonProps, 'size'>
onChange?: (even: any) => void;
}

const RadioButton = React.forwardRef<any, RadioButtonProps>((props, ref) => {
export const RadioButton = React.forwardRef<any, RadioButtonProps>((props, ref) => {
const {
prefixCls = 'w-radio',
type = 'button',
Expand Down
3 changes: 2 additions & 1 deletion packages/react-radio/src/RadioGroup.tsx
Expand Up @@ -10,7 +10,7 @@ export interface RadioGroupProps extends IProps, HTMLDivProps {
onChange?: RadioProps['onChange'];
}

export default React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref) => {
export const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref) => {
const { prefixCls = 'w-radio-group', className, name, value, onChange, children, ...other } = props;
return (
<div {...other} ref={ref} className={[prefixCls, className].filter(Boolean).join(' ').trim()}>
Expand All @@ -31,3 +31,4 @@ export default React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref) =>
</div>
);
});
export default RadioGroup;

0 comments on commit 1c26166

Please sign in to comment.