@icapps/react-iconic-icons
v1.1.0
Published
The react implementation of the iconic icons. This package is generated from the iconic figma file and contains all icons as react components for both web and native.
Keywords
Readme
@icapps/react-iconic-icons
The React implementation of the iconic icons. This package is generated from the iconic Figma file and contains all icons as React components for both web and React Native.
Installation
npm install @icapps/react-iconic-iconsOr with yarn:
yarn add @icapps/react-iconic-iconsUsage
Web (React)
import { IconName } from "@icapps/react-iconic-icons/web";
function MyComponent() {
return <IconName />;
}Native (React Native)
import { IconName } from "@icapps/react-iconic-icons/native";
function MyComponent() {
return <IconName />;
}Adding New Icons
When new icons are added to the Figma file, follow these steps:
- Ensure you have the
FIGMA_TOKENenvironment variable set (see Requirements below) - Run the export command:
npm run figma:exportThis command will:
- Export icons from Figma as SVG files
- Convert SVGs to React components for both web and native
- Generate TypeScript types
- Build the package:
npm run buildRequirements
FIGMA_TOKEN
To export icons from Figma, you need a Figma access token:
- Get the token from 1Password vault "icapps internal"
- Set it as an environment variable:
export FIGMA_TOKEN=your-token-hereSource
Icons are sourced from the Figma design file: Iconic Icons - Figma
Development
Scripts
npm run build- Build the package (TypeScript compilation + copy assets)npm run figma:export- Export icons from Figma and generate componentsnpm run convert:svg:native- Convert SVG files to React Native componentsnpm run convert:svg:web- Convert SVG files to React web componentsnpm run generate:icons- Generate TypeScript types for icon names
License
UNLICENSED
