1.0.5 • Published 11 months ago
mithatech-icons v1.0.5
Install
npm
npm install mithatech-icons
yarn
yarn add mithatech-icons
Dependencies
npm
npm install @mui/material @emotion/react @emotion/styled
yarn
yarn add @mui/material @emotion/react @emotion/styled
Example
src/components/Icons.tsx
import React from 'react';
import { SvgIcon, SvgIconProps } from '@mui/material';
import { IconType, getSvgIcon } from 'mithatech-icons';
interface IconsProps extends SvgIconProps {
icon: IconType;
}
const Icon = ({ icon, ...other }: IconsProps) => {
const svg = getSvgIcon(icon);
return <SvgIcon {...other}>{svg}</SvgIcon>;
};
export { Icon };
apps/page.tsx
<div className='wrapper'>
<Icon fontSize='small' color='primary' icon='eva-globe' />
<Icon icon='eva-github' />
</div>