From b59a97d4e1edefe4763edd2f962a236bf1b4ad8a Mon Sep 17 00:00:00 2001 From: Peterbjx-forest Date: Mon, 25 Mar 2024 16:35:33 +0800 Subject: [PATCH 1/2] feat: delete useless icon --- packages/component/src/Carousel/styles.ts | 8 ++++++++ packages/component/src/Upload/index.tsx | 4 ++-- packages/component/src/UploadButton/index.tsx | 4 ++-- packages/internal-icons/src/components/FileIcon.tsx | 13 +++++++++++++ .../src/components/NextButtonIcon.tsx | 12 +----------- .../src/components/PrevButtonIcon.tsx | 12 +----------- .../internal-icons/src/components/UploadIcon.tsx | 13 ------------- packages/internal-icons/src/index.ts | 2 +- packages/internal-icons/src/svgs/circle-close.svg | 3 --- packages/internal-icons/src/svgs/clear-icon.svg | 7 ------- packages/internal-icons/src/svgs/close.svg | 3 --- packages/internal-icons/src/svgs/copy.svg | 3 --- packages/internal-icons/src/svgs/downArrow.svg | 7 ------- packages/internal-icons/src/svgs/eye-invisible.svg | 9 --------- packages/internal-icons/src/svgs/eye.svg | 8 -------- packages/internal-icons/src/svgs/key-board.svg | 3 --- packages/internal-icons/src/svgs/logo.svg | 3 --- packages/internal-icons/src/svgs/query.svg | 3 --- packages/internal-icons/src/svgs/upload-icon.svg | 5 ----- 19 files changed, 28 insertions(+), 94 deletions(-) create mode 100644 packages/internal-icons/src/components/FileIcon.tsx delete mode 100644 packages/internal-icons/src/components/UploadIcon.tsx delete mode 100644 packages/internal-icons/src/svgs/circle-close.svg delete mode 100644 packages/internal-icons/src/svgs/clear-icon.svg delete mode 100644 packages/internal-icons/src/svgs/close.svg delete mode 100644 packages/internal-icons/src/svgs/copy.svg delete mode 100644 packages/internal-icons/src/svgs/downArrow.svg delete mode 100644 packages/internal-icons/src/svgs/eye-invisible.svg delete mode 100644 packages/internal-icons/src/svgs/eye.svg delete mode 100644 packages/internal-icons/src/svgs/key-board.svg delete mode 100644 packages/internal-icons/src/svgs/logo.svg delete mode 100644 packages/internal-icons/src/svgs/query.svg delete mode 100644 packages/internal-icons/src/svgs/upload-icon.svg diff --git a/packages/component/src/Carousel/styles.ts b/packages/component/src/Carousel/styles.ts index f9251f6..e3c3318 100644 --- a/packages/component/src/Carousel/styles.ts +++ b/packages/component/src/Carousel/styles.ts @@ -100,6 +100,10 @@ const useStyles = createStyles( width: 16px; height: 60px; right: 0; + svg { + width: 16px; + height: 60px; + } ::after { display: none; } @@ -112,6 +116,10 @@ const useStyles = createStyles( width: 16px; height: 60px; left: 0; + svg { + width: 16px; + height: 60px; + } ::after { display: none; } diff --git a/packages/component/src/Upload/index.tsx b/packages/component/src/Upload/index.tsx index 1b3780a..5cbbb1c 100644 --- a/packages/component/src/Upload/index.tsx +++ b/packages/component/src/Upload/index.tsx @@ -1,5 +1,5 @@ import React, { ReactElement, ReactNode } from 'react'; -import { DeleteOutlined, ShareExternalOutlined } from '@aelf-design/internal-icons'; +import { DeleteOutlined, FileIcon } from '@aelf-design/internal-icons'; import { Upload as AntdUpload, UploadProps as AntdUploadProps, Image } from 'antd'; import { useTheme } from 'antd-style'; import { UploadFile } from 'antd/es/upload'; @@ -56,7 +56,7 @@ function UploadItemRender({ ) : (
- +
Ready for review
diff --git a/packages/component/src/UploadButton/index.tsx b/packages/component/src/UploadButton/index.tsx index 1885810..927218d 100644 --- a/packages/component/src/UploadButton/index.tsx +++ b/packages/component/src/UploadButton/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { UploadIcon } from '@aelf-design/internal-icons'; +import { UploadOutlined } from '@aelf-design/internal-icons'; import { useTheme } from 'antd-style'; import useStyles from './style'; @@ -16,7 +16,7 @@ export default function UploadButton(props: IUploadButtonProps) { const token = useTheme(); return (
- +
{uploadText || 'Upload'}
{tips || ( diff --git a/packages/internal-icons/src/components/FileIcon.tsx b/packages/internal-icons/src/components/FileIcon.tsx new file mode 100644 index 0000000..9132586 --- /dev/null +++ b/packages/internal-icons/src/components/FileIcon.tsx @@ -0,0 +1,13 @@ +import * as React from 'react'; + +import { AelfIcon } from '../icon/AelfIcon'; +import AelfSVGComponent from '../svgs/file.svg'; +import { type IconProps } from '../type'; + +const componentName = 'FileIcon'; +export const FileIcon = React.forwardRef((props, ref) => { + return ( + + ); +}); +FileIcon.displayName = componentName; diff --git a/packages/internal-icons/src/components/NextButtonIcon.tsx b/packages/internal-icons/src/components/NextButtonIcon.tsx index ed361f5..7bee933 100644 --- a/packages/internal-icons/src/components/NextButtonIcon.tsx +++ b/packages/internal-icons/src/components/NextButtonIcon.tsx @@ -6,16 +6,6 @@ import { type IconProps } from '../type'; const componentName = 'NextButtonIcon'; export const NextButtonIcon = React.forwardRef((props, ref) => { - return ( - - ); + return ; }); NextButtonIcon.displayName = componentName; diff --git a/packages/internal-icons/src/components/PrevButtonIcon.tsx b/packages/internal-icons/src/components/PrevButtonIcon.tsx index aead532..76fc5bc 100644 --- a/packages/internal-icons/src/components/PrevButtonIcon.tsx +++ b/packages/internal-icons/src/components/PrevButtonIcon.tsx @@ -6,16 +6,6 @@ import { type IconProps } from '../type'; const componentName = 'PrevButtonIcon'; export const PrevButtonIcon = React.forwardRef((props, ref) => { - return ( - - ); + return ; }); PrevButtonIcon.displayName = componentName; diff --git a/packages/internal-icons/src/components/UploadIcon.tsx b/packages/internal-icons/src/components/UploadIcon.tsx deleted file mode 100644 index d58efd4..0000000 --- a/packages/internal-icons/src/components/UploadIcon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import * as React from 'react'; - -import { AelfIcon } from '../icon/AelfIcon'; -import AelfSVGComponent from '../svgs/upload-icon.svg'; -import { type IconProps } from '../type'; - -const componentName = 'UploadIcon'; -export const UploadIcon = React.forwardRef((props, ref) => { - return ( - - ); -}); -UploadIcon.displayName = componentName; diff --git a/packages/internal-icons/src/index.ts b/packages/internal-icons/src/index.ts index 72d381a..e7f5056 100644 --- a/packages/internal-icons/src/index.ts +++ b/packages/internal-icons/src/index.ts @@ -3,7 +3,7 @@ export * from './components/NextButtonIcon'; export * from './components/PrevButtonIcon'; export * from './components/ProgressErrorIcon'; export * from './components/ProgressSuccessIcon'; -export * from './components/UploadIcon'; +export * from './components/FileIcon'; export * from './components/direction/index'; export * from './components/suggestion/index'; diff --git a/packages/internal-icons/src/svgs/circle-close.svg b/packages/internal-icons/src/svgs/circle-close.svg deleted file mode 100644 index f34e568..0000000 --- a/packages/internal-icons/src/svgs/circle-close.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/packages/internal-icons/src/svgs/clear-icon.svg b/packages/internal-icons/src/svgs/clear-icon.svg deleted file mode 100644 index a762bdb..0000000 --- a/packages/internal-icons/src/svgs/clear-icon.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/packages/internal-icons/src/svgs/close.svg b/packages/internal-icons/src/svgs/close.svg deleted file mode 100644 index 6f72749..0000000 --- a/packages/internal-icons/src/svgs/close.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/internal-icons/src/svgs/copy.svg b/packages/internal-icons/src/svgs/copy.svg deleted file mode 100644 index 57b9dd1..0000000 --- a/packages/internal-icons/src/svgs/copy.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/internal-icons/src/svgs/downArrow.svg b/packages/internal-icons/src/svgs/downArrow.svg deleted file mode 100644 index aebe613..0000000 --- a/packages/internal-icons/src/svgs/downArrow.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/packages/internal-icons/src/svgs/eye-invisible.svg b/packages/internal-icons/src/svgs/eye-invisible.svg deleted file mode 100644 index 49324c4..0000000 --- a/packages/internal-icons/src/svgs/eye-invisible.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/packages/internal-icons/src/svgs/eye.svg b/packages/internal-icons/src/svgs/eye.svg deleted file mode 100644 index 1768abe..0000000 --- a/packages/internal-icons/src/svgs/eye.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/packages/internal-icons/src/svgs/key-board.svg b/packages/internal-icons/src/svgs/key-board.svg deleted file mode 100644 index 7fc317c..0000000 --- a/packages/internal-icons/src/svgs/key-board.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/internal-icons/src/svgs/logo.svg b/packages/internal-icons/src/svgs/logo.svg deleted file mode 100644 index d58a5c1..0000000 --- a/packages/internal-icons/src/svgs/logo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/internal-icons/src/svgs/query.svg b/packages/internal-icons/src/svgs/query.svg deleted file mode 100644 index 188112c..0000000 --- a/packages/internal-icons/src/svgs/query.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/internal-icons/src/svgs/upload-icon.svg b/packages/internal-icons/src/svgs/upload-icon.svg deleted file mode 100644 index 620f961..0000000 --- a/packages/internal-icons/src/svgs/upload-icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From 289345783c75c1bacb9fe0d9fdb4a895c1616289 Mon Sep 17 00:00:00 2001 From: Peterbjx-forest Date: Mon, 25 Mar 2024 16:54:50 +0800 Subject: [PATCH 2/2] feat: change time svg and icon demo color --- .dumi/theme/common/styles/Icon.tsx | 2 +- packages/internal-icons/src/svgs/filled/time.svg | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.dumi/theme/common/styles/Icon.tsx b/.dumi/theme/common/styles/Icon.tsx index 7eb7460..f9b9987 100644 --- a/.dumi/theme/common/styles/Icon.tsx +++ b/.dumi/theme/common/styles/Icon.tsx @@ -19,7 +19,7 @@ const Icon: React.FC = () => { margin: 3px 0; padding: 10px 0 0; overflow: hidden; - color: #555; + color: #101114; text-align: center; list-style: none; background-color: inherit; diff --git a/packages/internal-icons/src/svgs/filled/time.svg b/packages/internal-icons/src/svgs/filled/time.svg index e53bfcc..3318a23 100644 --- a/packages/internal-icons/src/svgs/filled/time.svg +++ b/packages/internal-icons/src/svgs/filled/time.svg @@ -1,4 +1,3 @@ - - - + +