mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +08:00
chore: reduce code for icons
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
|
||||
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 CodeIconProps extends Omit<SvgIconProps, 'color'> {
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const CodeIcon: FC<CodeIconProps> = ({ color, style, ...props}) => {
|
||||
export const CodeIcon = ({ color, style, ...props}: CodeIconProps) => {
|
||||
const propsStyles = {"color": color};
|
||||
const customStyles = {};
|
||||
const styles = {...propsStyles, ...customStyles, ...style}
|
||||
|
||||
Reference in New Issue
Block a user