@mellon-design/icons
v0.2.0
Published
React icon components for the Mellon design system
Maintainers
Readme
@mellon-design/icons
React icon components for the Mellon design system.
Install
npm install @mellon-design/iconsUsage
import { PlayIcon, DownloadFolderIcon } from '@mellon-design/icons';
function Toolbar() {
return (
<div style={{ color: '#111827' }}>
<PlayIcon />
<DownloadFolderIcon size={20} color="#2563eb" />
</div>
);
}Every icon is a forwardRef React component that accepts:
size— width/height in px or any CSS unit (default24)color— fill color (defaultcurrentColor, so icons inherit surrounding text color)- any other native
<svg>prop (className,onClick,aria-hidden, etc.)
Icons
| Component | Source |
| --- | --- |
| PlayIcon | svg/play.svg |
| PauseIcon | svg/pause.svg |
| StopIcon | svg/stop.svg |
| RecordIcon | svg/record.svg |
| DownloadIcon | svg/download.svg |
| FolderIcon | svg/folder.svg |
| DownloadFolderIcon | svg/download-folder.svg |
| AudioWaveIcon | svg/audio_wave.svg |
| AudioWaveTranscriptionIcon | svg/audio_wave_transcription.svg |
| AiMagicIcon | svg/ai_magic.svg |
| HeartIcon | svg/heart.svg |
| HomeIcon | svg/home.svg |
| LeftArrowIcon | svg/left-arrow.svg |
| LocationPinIcon | svg/location_pin.svg |
| MailIcon | svg/mail.svg |
| RightArrowIcon | svg/right-arrow.svg |
| SettingCogIcon | svg/setting_cog.svg |
Adding new icons
- Drop the raw SVG (24x24,
viewBox="0 0 24 24") intosvg/. - Create a matching component in
src/icons/following the pattern of the existing icons (hardcodedfill="black"replaced with thecolorprop, defaulting tocurrentColor). - Export it from
src/index.ts. - Run
npm run buildto verify it compiles.
Development
npm install
npm run build # bundles ESM + CJS + .d.ts into dist/
npm run typecheck