diff --git a/src/components/ErrorText/ErrorText.spec.tsx b/src/components/ErrorText/ErrorText.spec.tsx new file mode 100644 index 0000000..bc098ea --- /dev/null +++ b/src/components/ErrorText/ErrorText.spec.tsx @@ -0,0 +1,17 @@ +import { + describe, + expect, + test +} from 'vitest'; +import { render } from '@testing-library/react' +import { + ErrorText +} from './ErrorText' + + +describe('ErrorText', () => { + test('it renders with the text', () => { + const { queryByTestId } = render(An Error has occured!) + expect(queryByTestId('test-id')?.textContent).toEqual('An Error has occured!') + }) +}) \ No newline at end of file diff --git a/src/components/ErrorText/ErrorText.tsx b/src/components/ErrorText/ErrorText.tsx new file mode 100644 index 0000000..cc3d458 --- /dev/null +++ b/src/components/ErrorText/ErrorText.tsx @@ -0,0 +1,7 @@ +import { Typography, TypographyProps, } from "@mui/material"; + +export const ErrorText: React.FunctionComponent = ({ ...props }) => { + return ( + + ) +} \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 1d947d7..4764f6c 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1 +1,2 @@ -export * from './PasswordField/PasswordField'; \ No newline at end of file +export * from './PasswordField/PasswordField'; +export * from './ErrorText/ErrorText'; \ No newline at end of file