diff options
| -rw-r--r-- | src/components/atoms/icons/posts-stack.module.scss | 22 | ||||
| -rw-r--r-- | src/components/atoms/icons/posts-stack.stories.tsx | 13 | ||||
| -rw-r--r-- | src/components/atoms/icons/posts-stack.test.tsx | 9 | ||||
| -rw-r--r-- | src/components/atoms/icons/posts-stack.tsx | 68 | 
4 files changed, 112 insertions, 0 deletions
| 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<typeof PostsStackIcon>; + +const Template: ComponentStory<typeof PostsStackIcon> = (args) => ( +  <PostsStackIcon {...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(<PostsStack />); +    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 ( +    <svg +      viewBox="0 0 100 100" +      xmlns="http://www.w3.org/2000/svg" +      className={styles.icon} +    > +      <path +        className={styles.background} +        d="M 28.992096,1.4822128 H 90.770752 V 82.312253 H 28.992096 Z" +      /> +      <path +        className={styles.background} +        d="m 19.110672,8.992094 h 61.778656 v 80.83004 H 19.110672 Z" +      /> +      <path +        className={styles.background} +        d="m 9.229248,17.687748 h 61.778656 v 80.83004 H 9.229248 Z" +      /> +      <path +        className={styles.picture} +        d="M 18.149242,74.65544 H 33.375246 V 90.194215 H 18.149242 Z" +      /> +      <path +        className={styles.picture} +        d="M 18.142653,24.858688 H 62.094499 V 35.908926 H 18.142653 Z" +      /> +      <path +        className={styles.lines} +        d="m 17.618576,41.908926 h 45 v 2 h -45 z" +      /> +      <path +        className={styles.lines} +        d="m 17.618576,49.908926 h 45 v 2 h -45 z" +      /> +      <path +        className={styles.lines} +        d="m 17.618576,57.908926 h 45 v 2 h -45 z" +      /> +      <path +        className={styles.lines} +        d="m 17.618576,65.908926 h 45 v 2 h -45 z" +      /> +      <path +        className={styles.lines} +        d="m 41.833105,73.424828 h 20.785471 v 2 H 41.833105 Z" +      /> +      <path +        className={styles.lines} +        d="m 41.833105,81.424828 h 20.785471 v 2 H 41.833105 Z" +      /> +      <path +        className={styles.lines} +        d="m 41.833105,89.424828 h 20.785471 v 2 H 41.833105 Z" +      /> +    </svg> +  ); +}; + +export default PostsStack; | 
