import { Meta, Stories, ArgTypes, Canvas, Subtitle } from "@storybook/blocks";
import * as IconStories from "./src/icon.stories";
import packageInfo from "./package.json";
Icon
Version {packageInfo.version}
Showcase
Properties
Installation
Via NPM
Add the dependency to your consumer app like "@purpurds/icon": "x.y.z"
From outside the monorepo (build-time)
To install this package, you need to setup access to the artifactory. Click here to go to the guide on how to do that.
In MyApp.tsx
import "@purpurds/icon/styles";
and
import "@purpurds/icon/styles";
Examples
In MyComponent.tsx
Specific icon component
import { IconAiRobot } from "@purpurds/icon";
export const MyComponent = () => {
return (
<div>
<IconAiRobot size="xs" />
</div>
);
};
General icon component with prop
import { Icon, aiRobot } from "@purpurds/icon";
export const MyComponent = () => {
return (
<div>
<Icon svg={aiRobot} size="xs" />
</div>
);
};