This repository houses SVG icons you might need to build your application using the Moon Design System.
-
Clone this repository:
git clone https://github.com/heathmont/moon-icons-react.git cd moon-icons-react -
Create an
.envfile in the root directory with the following variables:FIGMA_TOKEN- Personal Figma access tokens with file content read-only permissions.
FIGMA_FILE_ID- The string of random alphanumeric characters found in your Figma URL after figma.com/file/.
-
Install dependencies:
npm install
-
Fetch SVGs from a specific page in Figma:
npm run figma:page
-
Generate React components from the fetched SVGs:
npm run build
-
Manually update
versioninpackage.jsonfile to the next patch version. -
Install updated dependencies:
npm install
-
Create a semantic PR into the
mainbranch.
A version of the npm package @heathmont/moon-icons-tw will be automatically published in approximately 5 minutes after your changes are merged to the main branch.
- Install the icons' package in your project
pnpm install @heathmont/moon-icons-tw
# or
npm install @heathmont/moon-icons-tw
# or
yarn @heathmont/moon-icons-tw- Import and use an icon in your application. Add an optional
classNamefor modifying size and color of the icon.
import { OtherFrame } from "@heathmont/moon-icons-tw";
const MyComponent = () => (
<>
// with Moon text sizes and colors
<OtherFrame className="text-moon-20 text-chichi" />
// or with Tailwind text sizes and colors
<OtherFrame className="text-xl text-red-500" />
</>
);