Skip to content

Commit

Permalink
Merge pull request #88 from AElf-devops/feature/doc-upload
Browse files Browse the repository at this point in the history
feat: add suggest icons
  • Loading branch information
aelf-lxy authored Mar 22, 2024
2 parents ca58a4b + 5da9ac5 commit 22fcc6d
Show file tree
Hide file tree
Showing 64 changed files with 223 additions and 168 deletions.
4 changes: 2 additions & 2 deletions .dumi/theme/builtins/IconSearch/fields.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as AntdIcons from '@ant-design/icons/lib/icons';
import * as AntdWeb3Icons from '@aelf-design/internal-icons';

const all = Object.keys(AntdIcons)
const all = Object.keys(AntdWeb3Icons)
.map((n) => n.replace(/(Outlined|Filled|TwoTone)$/, ''))
.filter((n, i, arr) => arr.indexOf(n) === i);

Expand Down
4 changes: 0 additions & 4 deletions packages/component/src/Carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ export default function Carousel(props: ICarouselProps) {
color={token.customCarousel?.colorNavigation}
hoverColor={token.customCarousel?.colorNavigationHover}
activeColor={token.customCarousel?.colorNavigationActive}
width={16}
height={60}
/>
</div>
<div className="swiper-button-prev">
Expand All @@ -92,8 +90,6 @@ export default function Carousel(props: ICarouselProps) {
color={token.customCarousel?.colorNavigation}
hoverColor={token.customCarousel?.colorNavigationHover}
activeColor={token.customCarousel?.colorNavigationActive}
width={16}
height={60}
/>
</div>
</Swiper>
Expand Down
8 changes: 1 addition & 7 deletions packages/component/src/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ const getClearIcon = (
color={token?.colorBorder}
hoverColor={token?.Table?.headerBg}
activeColor={token?.colorTextDisabled}
width="16px"
height="16px"
/>
</div>
);
Expand Down Expand Up @@ -103,11 +101,7 @@ function InputPassword({
}
}
iconRender={(visible) =>
visible ? (
<EyeTwoToneIcon {...iconProps} width={16} height={16} />
) : (
<EyeInvisibleOutlinedIcon {...iconProps} width={16} height={16} />
)
visible ? <EyeTwoToneIcon {...iconProps} /> : <EyeInvisibleOutlinedIcon {...iconProps} />
}
></AntdInput.Password>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Modal({ wrapClassName, width = 438, closeIcon = true, children, ...prop
closeIcon={
closeIcon ? (
<div className={styles.closeIconWrap}>
<CloseIcon color={token?.colorTextBase} width="16px" height="16px" />
<CloseIcon color={token?.colorTextBase} />
</div>
) : null
}
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/Pagination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useMemo, useState } from 'react';
import { DownArrowIcon, LeftArrowIcon, RightArrowIcon } from '@aelf-design/internal-icons';
import { DownArrowIcon, LeftOutlined, RightOutlined } from '@aelf-design/internal-icons';
import { Select } from 'antd';
import { debounce } from 'lodash-es';

Expand Down Expand Up @@ -167,7 +167,7 @@ export default function Pagination({
size="small"
ghost
onClick={runPrevChange}
icon={<LeftArrowIcon />}
icon={<LeftOutlined />}
/>
</div>
<div className={cx(prefixCls + '-pageNumber-container', styles.pageNumberContainer)}>
Expand All @@ -181,7 +181,7 @@ export default function Pagination({
ghost
disabled={isLastPage}
onClick={runNextChange}
icon={<RightArrowIcon />}
icon={<RightOutlined />}
/>
</div>
<div>
Expand Down
6 changes: 1 addition & 5 deletions packages/component/src/Upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ function UploadItemRender({
color={token.colorPrimary}
hoverColor={token.colorPrimaryHover}
activeColor={token.colorPrimaryActive}
width={16}
height={16}
/>
<span className="clear-text">Delete</span>
</div>
Expand All @@ -58,7 +56,7 @@ function UploadItemRender({
) : (
<div className={cx(styles.FilePreviewContainer)}>
<div className="file-icon-container">
<FileIcon width={56} height={56} />
<FileIcon />
<div className="file-tips">Ready for review</div>
</div>
<div className="file-info">
Expand All @@ -73,8 +71,6 @@ function UploadItemRender({
color={token.colorPrimary}
hoverColor={token.colorPrimaryHover}
activeColor={token.colorPrimaryActive}
width={16}
height={16}
/>
<span className="clear-text">Remove</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/component/src/UploadButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function UploadButton(props: IUploadButtonProps) {
const token = useTheme();
return (
<div className={cx(prefixCls + '-upload-button', styles.uploadButton)}>
<UploadIcon color={uploadIconColor || token.colorPrimary} width={40} height={40} />
<UploadIcon color={uploadIconColor || token.colorPrimary} />
<div className={styles.message}>
<div className={styles.uploadText}>{uploadText || 'Upload'}</div>
{tips || (
Expand Down
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/CircleClose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ const componentName = 'CircleCloseIconOutlined';
export const CircleCloseIconOutlined = React.forwardRef<HTMLSpanElement, IconProps>(
(props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={16}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
},
);
Expand Down
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/ClearIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import { type IconProps } from '../type';
const componentName = 'ClearIconFilled';
export const ClearIconFilled = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={16}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
ClearIconFilled.displayName = componentName;
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/CloseIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import { type IconProps } from '../type';
const componentName = 'CloseIcon';
export const CloseIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={16}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
CloseIcon.displayName = 'CloseIcon';
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/CopyIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import { type IconProps } from '../type';
const componentName = 'CopyIcon';
export const CopyIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={16}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
CopyIcon.displayName = componentName;
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/DownArrowIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import { type IconProps } from '../type';
const componentName = 'DownArrowIcon';
export const DownArrowIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={12}
defaultHeight={12}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
DownArrowIcon.displayName = 'DownArrowIcon';
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const EyeInvisibleOutlinedIcon = React.forwardRef<HTMLSpanElement, IconPr
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={18}
defaultHeight={18}
style={{ fontSize: '18px' }}
ref={ref}
{...props}
/>
Expand Down
9 changes: 1 addition & 8 deletions packages/internal-icons/src/components/EyeTwoToneIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import { type IconProps } from '../type';
const componentName = 'EyeTwoToneIcon';
export const EyeTwoToneIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={18}
defaultHeight={14}
ref={ref}
{...props}
/>
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
EyeTwoToneIcon.displayName = 'EyeTwoToneIcon';
3 changes: 1 addition & 2 deletions packages/internal-icons/src/components/FileIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export const FileIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={56}
defaultHeight={56}
style={{ fontSize: '56px' }}
ref={ref}
{...props}
/>
Expand Down
20 changes: 0 additions & 20 deletions packages/internal-icons/src/components/LeftArrowIcon.tsx

This file was deleted.

6 changes: 4 additions & 2 deletions packages/internal-icons/src/components/NextButtonIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export const NextButtonIcon = React.forwardRef<HTMLSpanElement, IconProps>((prop
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={60}
style={{
width: '16px',
height: '60px',
}}
ref={ref}
{...props}
/>
Expand Down
6 changes: 4 additions & 2 deletions packages/internal-icons/src/components/PrevButtonIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export const PrevButtonIcon = React.forwardRef<HTMLSpanElement, IconProps>((prop
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={16}
defaultHeight={60}
style={{
width: '16px',
height: '60px',
}}
ref={ref}
{...props}
/>
Expand Down
5 changes: 3 additions & 2 deletions packages/internal-icons/src/components/ProgressErrorIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ export const ProgressErrorIcon = React.forwardRef<HTMLSpanElement, IconProps>((p
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={24}
defaultHeight={24}
style={{
fontSize: '24px',
}}
ref={ref}
{...props}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ export const ProgressSuccessIcon = React.forwardRef<HTMLSpanElement, IconProps>(
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={24}
defaultHeight={24}
style={{
fontSize: '24px',
}}
ref={ref}
{...props}
/>
Expand Down
5 changes: 3 additions & 2 deletions packages/internal-icons/src/components/QueryIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ export const QueryIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, re
<AelfIcon
component={AelfSVGComponent}
componentName={componentName}
defaultWidth={18}
defaultHeight={18}
style={{
fontSize: '18px',
}}
ref={ref}
{...props}
/>
Expand Down
20 changes: 0 additions & 20 deletions packages/internal-icons/src/components/RightArrowIcon.tsx

This file was deleted.

8 changes: 7 additions & 1 deletion packages/internal-icons/src/components/UploadIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import { type IconProps } from '../type';
const componentName = 'UploadIcon';
export const UploadIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
<AelfIcon
component={AelfSVGComponent}
style={{ fontSize: '40px' }}
componentName={componentName}
ref={ref}
{...props}
/>
);
});
UploadIcon.displayName = componentName;
2 changes: 1 addition & 1 deletion packages/internal-icons/src/components/direction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export * from './LeftOutlined';
export * from './MenuFoldOutlined';
export * from './MenuUnfoldOutlined';
export * from './RightArrowOutlined';
export * from './RightOutlined';
export * from './RollBackOutlined';
export * from './RotateLeftOutlined';
export * from './SwapLeftOutlined';
export * from './SwapOutlined';
export * from './SwapRightOutlined';
export * from './UpArrowOutlined';
export * from './UpOutlined';
export * from './RightOutlined';
13 changes: 13 additions & 0 deletions packages/internal-icons/src/components/suggestion/AddOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/suggestion/add.svg';
import { IconProps } from '../../type';

const componentName = 'AddOutlined';
export const AddOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
AddOutlined.displayName = componentName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react';

import { AelfIcon } from '../../icon/AelfIcon';
import AelfSVGComponent from '../../svgs/suggestion/check.svg';
import { IconProps } from '../../type';

const componentName = 'CheckOutlined';
export const CheckOutlined = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
return (
<AelfIcon component={AelfSVGComponent} componentName={componentName} ref={ref} {...props} />
);
});
CheckOutlined.displayName = componentName;
Loading

0 comments on commit 22fcc6d

Please sign in to comment.