Skip to content

Commit

Permalink
feat: export richprogress
Browse files Browse the repository at this point in the history
  • Loading branch information
aelf-lxy committed Mar 14, 2024
1 parent a7edd06 commit 6d024ed
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-design/common",
"version": "0.0.1-alpha.3",
"version": "1.0.0.alpha.1",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aelf-design",
"version": "0.0.1-alpha.3",
"version": "1.0.0.alpha.1",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/ProgressModal/demos/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Button } from 'aelf-design';

import { IStepItem } from '../../RichProgress/index';
import { ProgressModal } from '../index';
import ProgressModal from '../index';

const App: React.FC = () => {
const [showProgress, setShowProgress] = React.useState(false);
Expand Down
8 changes: 5 additions & 3 deletions packages/component/src/ProgressModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { ReactNode } from 'react';
import React, { memo, ReactNode } from 'react';
import { ModalProps } from 'antd';

import Modal from '../Modal';
import { IStepItem, RichProgress } from '../RichProgress';
import RichProgress, { IStepItem } from '../RichProgress';
import useStyles from './style';

export interface IProgressModalProps extends ModalProps {
Expand All @@ -15,7 +15,7 @@ export interface IProgressModalProps extends ModalProps {
errorIcon?: ReactNode;
}

export const ProgressModal = (props: IProgressModalProps) => {
const ProgressModal = (props: IProgressModalProps) => {
const { steps, desc, successIcon, errorIcon, strokeColor, trailColor, strokeErrorColor } = props;
const { styles, cx, prefixCls } = useStyles();

Expand All @@ -38,3 +38,5 @@ export const ProgressModal = (props: IProgressModalProps) => {
</Modal>
);
};

export default memo(ProgressModal);
2 changes: 1 addition & 1 deletion packages/component/src/RichProgress/demos/basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { IStepItem, RichProgress } from '../index';
import RichProgress, { IStepItem } from '../index';

const App: React.FC = () => {
const steps: IStepItem[] = [
Expand Down
4 changes: 2 additions & 2 deletions packages/component/src/RichProgress/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import React, { memo, ReactNode } from 'react';
import { ProgressErrorIcon, ProgressSuccessIcon } from '@aelf-design/internal-icons';
import { useResponsive } from 'antd-style';

Expand Down Expand Up @@ -196,4 +196,4 @@ const RichProgress = ({
);
};

export { RichProgress };
export default memo(RichProgress);
6 changes: 5 additions & 1 deletion packages/component/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ export type { IUploadProps } from './Upload';
export { default as Loading } from './Loading';
export type { ILoadingProps } from './Loading';
export { default as Carousel } from './Carousel';
export type { ICarouselProps } from './Carousel';
export { default as UploadButton } from './UploadButton';
export type { IUploadButtonProps } from './UploadButton';
export type { ICarouselProps } from './Carousel';
export { default as RichProgress } from './RichProgress';
export type { ProgressLineType, IStepItem, IProgressStepsProps } from './RichProgress';
export { default as ProgressModal } from './ProgressModal';
export type { IProgressModalProps } from './ProgressModal';

export { default as useResponsive } from './hooks/useResponsive';
export { default as useAWSUploadService } from './hooks/useAWSUploadService';
2 changes: 1 addition & 1 deletion packages/internal-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aelf-design/internal-icons",
"version": "0.0.1-alpha.3",
"version": "1.0.0.alpha.1",
"type": "module",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 6d024ed

Please sign in to comment.