From 60c284c7ad7383313886c5f4716589cb6c180693 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 31 Mar 2022 23:19:53 +0200 Subject: chore: add a posts stack svg icon component --- src/components/atoms/icons/posts-stack.module.scss | 22 +++++++ src/components/atoms/icons/posts-stack.stories.tsx | 13 +++++ src/components/atoms/icons/posts-stack.test.tsx | 9 +++ src/components/atoms/icons/posts-stack.tsx | 68 ++++++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 src/components/atoms/icons/posts-stack.module.scss create mode 100644 src/components/atoms/icons/posts-stack.stories.tsx create mode 100644 src/components/atoms/icons/posts-stack.test.tsx create mode 100644 src/components/atoms/icons/posts-stack.tsx (limited to 'src') diff --git a/src/components/atoms/icons/posts-stack.module.scss b/src/components/atoms/icons/posts-stack.module.scss new file mode 100644 index 0000000..a22d265 --- /dev/null +++ b/src/components/atoms/icons/posts-stack.module.scss @@ -0,0 +1,22 @@ +@use "@styles/abstracts/functions" as fun; + +.icon { + display: block; + width: var(--icon-size, #{fun.convert-px(40)}); +} + +.lines { + fill: var(--color-fg); + stroke-width: 4; +} + +.picture { + fill: var(--color-primary-lighter); + stroke: var(--color-primary-darker); +} + +.background { + fill: var(--color-bg); + stroke: var(--color-primary-darker); + stroke-width: 4; +} diff --git a/src/components/atoms/icons/posts-stack.stories.tsx b/src/components/atoms/icons/posts-stack.stories.tsx new file mode 100644 index 0000000..e2206c2 --- /dev/null +++ b/src/components/atoms/icons/posts-stack.stories.tsx @@ -0,0 +1,13 @@ +import { ComponentMeta, ComponentStory } from '@storybook/react'; +import PostsStackIcon from './posts-stack'; + +export default { + title: 'Atoms/Icons', + component: PostsStackIcon, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ( + +); + +export const PostsStack = Template.bind({}); diff --git a/src/components/atoms/icons/posts-stack.test.tsx b/src/components/atoms/icons/posts-stack.test.tsx new file mode 100644 index 0000000..8f44fa9 --- /dev/null +++ b/src/components/atoms/icons/posts-stack.test.tsx @@ -0,0 +1,9 @@ +import { render } from '@test-utils'; +import PostsStack from './posts-stack'; + +describe('PostsStack', () => { + it('renders a posts stack icon', () => { + const { container } = render(); + expect(container).toBeDefined(); + }); +}); diff --git a/src/components/atoms/icons/posts-stack.tsx b/src/components/atoms/icons/posts-stack.tsx new file mode 100644 index 0000000..22069ac --- /dev/null +++ b/src/components/atoms/icons/posts-stack.tsx @@ -0,0 +1,68 @@ +import { FC } from 'react'; +import styles from './posts-stack.module.scss'; + +/** + * Posts stack component. + * + * Render a posts stack svg icon. + */ +const PostsStack: FC = () => { + return ( + + + + + + + + + + + + + + + ); +}; + +export default PostsStack; -- cgit v1.2.3