diff --git a/packages/gamut/src/Form/elements/FormError.tsx b/packages/gamut/src/Form/elements/FormError.tsx index cafd0b72651..33b9fd6432f 100644 --- a/packages/gamut/src/Form/elements/FormError.tsx +++ b/packages/gamut/src/Form/elements/FormError.tsx @@ -1,37 +1,27 @@ import { theme, variant } from '@codecademy/gamut-styles'; -import { StyleProps } from '@codecademy/variance'; import styled from '@emotion/styled'; -import { HTMLAttributes } from 'react'; -import * as React from 'react'; -const errorSpanVariants = variant({ - base: { - left: 0, - top: `calc(100% - ${theme.spacing[8]})`, - color: 'feedback-error', - display: 'inline-block', - fontSize: 'small', - }, - defaultVariant: 'initial', - variants: { - initial: { - position: 'initial', +export const FormError = styled.span( + variant({ + base: { + left: 0, + top: `calc(100% - ${theme.spacing[8]})`, + color: 'feedback-error', + display: 'inline-block', + fontSize: 'small', }, - absolute: { - position: 'absolute', + defaultVariant: 'initial', + variants: { + initial: { + position: 'initial', + }, + absolute: { + position: 'absolute', + }, + inlineCentered: { + position: 'initial', + textAlign: 'center', + }, }, - inlineCentered: { - position: 'initial', - textAlign: 'center', - }, - }, -}); - -const ErrorSpan = styled.span(errorSpanVariants); - -type FormErrorProps = StyleProps & - HTMLAttributes; - -export const FormError: React.FC = (props) => { - return ; -}; + }) +);