Skip to content

Instantly share code, notes, and snippets.

@omsharp
Created October 4, 2021 21:34
Show Gist options
  • Save omsharp/f87080efba759a9267af4a8f58d27f04 to your computer and use it in GitHub Desktop.
Save omsharp/f87080efba759a9267af4a8f58d27f04 to your computer and use it in GitHub Desktop.

Revisions

  1. omsharp created this gist Oct 4, 2021.
    13 changes: 13 additions & 0 deletions ValidationErrorText.tsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    import { Text, TextProps } from '@chakra-ui/react';

    //! A good example on how to extend chakra ui components
    export const ValidationErrorText: React.FC<TextProps> = ({
    children,
    ...props
    }) => {
    return (
    <Text fontSize="sm" color="red.500" {...props}>
    {children}
    </Text>
    );
    };