-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ea42bc
commit e8959a1
Showing
3 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/components/src/__illustrations__/Icon/v2/_docs/Icon.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Canvas, Controls, Meta, Story } from "@storybook/blocks" | ||
import { ResourceLinks, KAIOInstallation } from "~storybook/components" | ||
import * as IconStories from "../../v1/_docs/Icon.stories" | ||
|
||
<Meta title="Illustrations/Icon/Icon (v2)"/> | ||
|
||
# Icon | ||
|
||
<ResourceLinks | ||
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Icons" | ||
/> | ||
|
||
## Installation | ||
|
||
Each icon is imported separately, for example if you'd like the `AddIcon` you will use the following import. | ||
|
||
<KAIOInstallation exportNames={["AddIcon" ]} family="illustrations" version="2" /> | ||
|
||
See: Reference for all icons available to import. | ||
|
||
## Overview | ||
|
||
All Icon components can be meaningful or presentational icons. | ||
|
||
<Canvas of={IconStories.Playground} /> | ||
<Controls of={IconStories.Playground} /> | ||
|
||
## Applying Colour | ||
|
||
Icon's inherit the text colour through `currentColor`. | ||
|
||
There are two ways you can apply the colour: | ||
|
||
1. Add a `classNameOverride` to the icon element | ||
|
||
```tsx | ||
<AddIcon classNameOverride="text-blue-500" /> | ||
``` | ||
|
||
2. Change the text colour of the wrapping element | ||
|
||
<Canvas of={IconStories.ApplyColour} sourceState="shown" /> | ||
|
||
## Reference | ||
|
||
Tip: click on the icon you want for a quick copy! | ||
|
||
<Story of={IconStories.Reference} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "../v1" |