Skip to content

Commit

Permalink
feat: add info icon (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWaldschmidt authored Feb 29, 2024
1 parent d9fd9a7 commit d2d7ddf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v2.0.16

- Adds `CircleInfo` to the `Icon` component

## v2.0.15

- Adds `IconColor` options to the `Modal` component of
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/ui-components",
"version": "2.0.15",
"version": "2.0.16",
"engines": {
"node": ">=20.2.0",
"npm": ">=10.2.0"
Expand Down
19 changes: 9 additions & 10 deletions src/components/Icon/Icon.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { Canvas, ArgTypes, PRIMARY_STORY } from '@storybook/addon-docs';
import { Canvas } from '@storybook/addon-docs';
import { Primary } from './Icon.stories';

# Modal
# Icon

<Canvas of={Primary} />

## How to Use
## Adding Icons

```html

```

## Props

<ArgTypes story={PRIMARY_STORY} />
- Get the SVG for the new Icon
- Create a new SVG file with the name of the icon within the `./svgs` directory
- Ensure the `<svg>` tag has no attributes
- Ensure the various `fill`/ `stroke`/ other colored SVG parts are set to `currentColor`
- Within `./types.ts` add the new icon to the `IconName` constant ensuring the value matches the name of the SVG file
- Within Storybook go to the `Icon > All Icons` page and ensure the icon shows up and the sizing matches the other icons
3 changes: 3 additions & 0 deletions src/components/Icon/svgs/CircleInfo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/Icon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const IconName = {
CIRCLE_CLOSE: 'CircleClose',
CIRCLE_EMPTY: 'CircleEmpty',
CIRCLE_EXCLAMATION: 'CircleExclamation',
CIRCLE_INFO: 'CircleInfo',
CIRCLE_QUESTION: 'CircleQuestion',
CIRCLE_USER: 'CircleUser',
CLOSE: 'Close',
Expand Down

0 comments on commit d2d7ddf

Please sign in to comment.