From 9b31e81c8d45eaf0dc6971655dc08b0d0a1cbe56 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 11:46:31 +0200 Subject: chore: add an envelop svg icon component --- src/components/atoms/icons/envelop.module.scss | 28 ++++++++++++ src/components/atoms/icons/envelop.stories.tsx | 13 ++++++ src/components/atoms/icons/envelop.test.tsx | 9 ++++ src/components/atoms/icons/envelop.tsx | 60 ++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 src/components/atoms/icons/envelop.module.scss create mode 100644 src/components/atoms/icons/envelop.stories.tsx create mode 100644 src/components/atoms/icons/envelop.test.tsx create mode 100644 src/components/atoms/icons/envelop.tsx (limited to 'src') diff --git a/src/components/atoms/icons/envelop.module.scss b/src/components/atoms/icons/envelop.module.scss new file mode 100644 index 0000000..202900b --- /dev/null +++ b/src/components/atoms/icons/envelop.module.scss @@ -0,0 +1,28 @@ +@use "@styles/abstracts/functions" as fun; + +.icon { + display: block; + width: var(--icon-size, #{fun.convert-px(40)}); +} + +.envelop { + fill: var(--color-primary-lighter); + stroke: var(--color-primary-darker); + stroke-width: 4; +} + +.lines { + fill: var(--color-fg); +} + +.background { + fill: var(--color-shadow-dark); + stroke: var(--color-primary-darker); + stroke-width: 4; +} + +.paper { + fill: var(--color-bg); + stroke: var(--color-primary-darker); + stroke-width: 4; +} diff --git a/src/components/atoms/icons/envelop.stories.tsx b/src/components/atoms/icons/envelop.stories.tsx new file mode 100644 index 0000000..9577431 --- /dev/null +++ b/src/components/atoms/icons/envelop.stories.tsx @@ -0,0 +1,13 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import EnvelopIcon from './envelop'; + +export default { + title: 'Atoms/Icons', + component: EnvelopIcon, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +export const Envelop = Template.bind({}); diff --git a/src/components/atoms/icons/envelop.test.tsx b/src/components/atoms/icons/envelop.test.tsx new file mode 100644 index 0000000..072dc85 --- /dev/null +++ b/src/components/atoms/icons/envelop.test.tsx @@ -0,0 +1,9 @@ +import { render } from '@test-utils'; +import Envelop from './envelop'; + +describe('Envelop', () => { + it('renders an envelop icon', () => { + const { container } = render(); + expect(container).toBeDefined(); + }); +}); diff --git a/src/components/atoms/icons/envelop.tsx b/src/components/atoms/icons/envelop.tsx new file mode 100644 index 0000000..a846a45 --- /dev/null +++ b/src/components/atoms/icons/envelop.tsx @@ -0,0 +1,60 @@ +import { FC } from 'react'; +import styles from './envelop.module.scss'; + +/** + * Envelop Component + * + * Render an envelop svg icon. + */ +const Envelop: FC = () => { + return ( + + + + + + + + + + + + + ); +}; + +export default Envelop; -- cgit v1.2.3