From 5d95c81c66b021cea387eb2c9850686c5f4e82c7 Mon Sep 17 00:00:00 2001 From: Nathaniel Waldschmidt Date: Thu, 29 Feb 2024 09:53:20 -0600 Subject: [PATCH] feat: add info icon --- CHANGELOG.md | 3 +++ package-lock.json | 4 ++-- package.json | 2 +- src/components/Icon/Icon.mdx | 19 +++++++++---------- src/components/Icon/svgs/CircleInfo.svg | 3 +++ src/components/Icon/types.ts | 1 + 6 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 src/components/Icon/svgs/CircleInfo.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 91a85eb27..b3cea7b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## v2.0.16 +- Adds `CircleInfo` to the `Icon` component + ## v2.0.15 - Adds `IconColor` options to the `Modal` component of diff --git a/package-lock.json b/package-lock.json index af919a40c..a8aca5b2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lob/ui-components", - "version": "2.0.15", + "version": "2.0.16", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lob/ui-components", - "version": "2.0.15", + "version": "2.0.16", "dependencies": { "date-fns": "^2.29.3", "date-fns-holiday-us": "^0.3.1", diff --git a/package.json b/package.json index c32fc739c..a10d35f84 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/components/Icon/Icon.mdx b/src/components/Icon/Icon.mdx index aef9ce268..e68bf299b 100644 --- a/src/components/Icon/Icon.mdx +++ b/src/components/Icon/Icon.mdx @@ -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 -## How to Use +## Adding Icons -```html - -``` - -## Props - - +- Get the SVG for the new Icon +- Create a new SVG file with the name of the icon within the `./svgs` directory + - Ensure the `` 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 diff --git a/src/components/Icon/svgs/CircleInfo.svg b/src/components/Icon/svgs/CircleInfo.svg new file mode 100644 index 000000000..b7d740ab5 --- /dev/null +++ b/src/components/Icon/svgs/CircleInfo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Icon/types.ts b/src/components/Icon/types.ts index 3b0ae0521..143990e3f 100644 --- a/src/components/Icon/types.ts +++ b/src/components/Icon/types.ts @@ -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',