chore: reduce code for icons

This commit is contained in:
DarkSky
2022-08-12 01:42:17 +08:00
parent 40b617c429
commit d3b4906da9
135 changed files with 268 additions and 668 deletions
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.8 9V4.1a.9.9 0 0 0-.9-.9H15v1.6h3.2L4.8 18.2V15H3.2v4.9a.9.9 0 0 0 .9.9H9v-1.6H6.063L19.2 6.063V9h1.6Z" clip-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.8 9V4.1a.9.9 0 0 0-.9-.9H15v1.6h3.2L4 19l1.131 1.131L19.2 6.063V9h1.6Z" clip-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 192 B

@@ -1,21 +1,18 @@
import { FC } from 'react';
// eslint-disable-next-line no-restricted-imports
import { SvgIcon } from '@mui/material';
// eslint-disable-next-line no-restricted-imports
import type { SvgIconProps } from '@mui/material';
import { SvgIcon, SvgIconProps } from '@mui/material';
export interface ConectorArrowIconProps extends Omit<SvgIconProps, 'color'> {
color?: string
}
export const ConectorArrowIcon: FC<ConectorArrowIconProps> = ({ color, style, ...props}) => {
export const ConectorArrowIcon = ({ color, style, ...props}: ConectorArrowIconProps) => {
const propsStyles = {"color": color};
const customStyles = {};
const styles = {...propsStyles, ...customStyles, ...style}
return (
<SvgIcon style={styles} {...props}>
<path fillRule="evenodd" d="M20.8 9V4.1a.9.9 0 0 0-.9-.9H15v1.6h3.2L4.8 18.2V15H3.2v4.9a.9.9 0 0 0 .9.9H9v-1.6H6.063L19.2 6.063V9h1.6Z" clipRule="evenodd" />
<path fillRule="evenodd" d="M20.8 9V4.1a.9.9 0 0 0-.9-.9H15v1.6h3.2L4 19l1.131 1.131L19.2 6.063V9h1.6Z" clipRule="evenodd" />
</SvgIcon>
)
};