diff --git a/src/ui/spinner/index.tsx b/src/ui/spinner/index.tsx new file mode 100644 index 0000000..4986015 --- /dev/null +++ b/src/ui/spinner/index.tsx @@ -0,0 +1 @@ +export * from './spinner.component'; diff --git a/src/ui/spinner/spinner.component.tsx b/src/ui/spinner/spinner.component.tsx new file mode 100644 index 0000000..ae8e2a0 --- /dev/null +++ b/src/ui/spinner/spinner.component.tsx @@ -0,0 +1,25 @@ +import React from 'react'; +import clsx from 'clsx'; + +export const Spinner = ({ className }: { className?: string }) => ( + + + + +); diff --git a/src/ui/spinner/spinner.spec.tsx b/src/ui/spinner/spinner.spec.tsx new file mode 100644 index 0000000..ca00152 --- /dev/null +++ b/src/ui/spinner/spinner.spec.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import { axe } from 'jest-axe'; + +import { Spinner } from './spinner.component'; + +describe('Spinner', () => { + test('should render', async () => { + const { container } = render(); + + expect(await axe(container)).toHaveNoViolations(); + }); +}); diff --git a/src/ui/spinner/spinner.stories.tsx b/src/ui/spinner/spinner.stories.tsx new file mode 100644 index 0000000..d3d4c62 --- /dev/null +++ b/src/ui/spinner/spinner.stories.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { ComponentMeta, ComponentStory } from '@storybook/react'; + +import { Spinner } from './spinner.component'; + +export default { + title: 'Atoms/Spinner', + component: Spinner, +} as ComponentMeta; + +export const Default: ComponentStory = () => ; diff --git a/tailwind.config.js b/tailwind.config.js index 9435640..c51d8ad 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -7,6 +7,9 @@ module.exports = { mono: ['Roboto Mono', 'monospace'], }, extend: { + animation: { + 'spin-1.5': 'spin 1.5s linear infinite', + }, colors: { primary: { 100: '#45a3db', @@ -36,7 +39,7 @@ module.exports = { boxShadow: { 'primary-100': '0px 0px 5px #45a3db', 'error-100': '0px 0px 5px #e74c3c', - } + }, }, }, plugins: [],