From 6d024ed2eca200523145c0b0eeb7c1c835e34339 Mon Sep 17 00:00:00 2001 From: aelf-lxy Date: Thu, 14 Mar 2024 17:53:01 +0800 Subject: [PATCH] feat: export richprogress --- packages/common/package.json | 2 +- packages/component/package.json | 2 +- packages/component/src/ProgressModal/demos/basic.tsx | 2 +- packages/component/src/ProgressModal/index.tsx | 8 +++++--- packages/component/src/RichProgress/demos/basic.tsx | 2 +- packages/component/src/RichProgress/index.tsx | 4 ++-- packages/component/src/index.tsx | 6 +++++- packages/internal-icons/package.json | 2 +- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/common/package.json b/packages/common/package.json index 5daa3d8..4b494c9 100755 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -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", diff --git a/packages/component/package.json b/packages/component/package.json index 14a30ac..92abbe3 100755 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -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", diff --git a/packages/component/src/ProgressModal/demos/basic.tsx b/packages/component/src/ProgressModal/demos/basic.tsx index 1d47161..81761f2 100644 --- a/packages/component/src/ProgressModal/demos/basic.tsx +++ b/packages/component/src/ProgressModal/demos/basic.tsx @@ -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); diff --git a/packages/component/src/ProgressModal/index.tsx b/packages/component/src/ProgressModal/index.tsx index 1116971..16a617b 100644 --- a/packages/component/src/ProgressModal/index.tsx +++ b/packages/component/src/ProgressModal/index.tsx @@ -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 { @@ -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(); @@ -38,3 +38,5 @@ export const ProgressModal = (props: IProgressModalProps) => { ); }; + +export default memo(ProgressModal); diff --git a/packages/component/src/RichProgress/demos/basic.tsx b/packages/component/src/RichProgress/demos/basic.tsx index 4574b8a..ac9059b 100644 --- a/packages/component/src/RichProgress/demos/basic.tsx +++ b/packages/component/src/RichProgress/demos/basic.tsx @@ -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[] = [ diff --git a/packages/component/src/RichProgress/index.tsx b/packages/component/src/RichProgress/index.tsx index 25cde77..29ae79d 100644 --- a/packages/component/src/RichProgress/index.tsx +++ b/packages/component/src/RichProgress/index.tsx @@ -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'; @@ -196,4 +196,4 @@ const RichProgress = ({ ); }; -export { RichProgress }; +export default memo(RichProgress); diff --git a/packages/component/src/index.tsx b/packages/component/src/index.tsx index 86aa09e..a6acc12 100644 --- a/packages/component/src/index.tsx +++ b/packages/component/src/index.tsx @@ -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'; diff --git a/packages/internal-icons/package.json b/packages/internal-icons/package.json index 21a27ee..90c74fc 100755 --- a/packages/internal-icons/package.json +++ b/packages/internal-icons/package.json @@ -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",