Skip to content

Commit

Permalink
ref: moved InlineErrorText to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Oct 18, 2023
1 parent 9d79fd1 commit 2cdea51
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/components/InlineErrorText.js

This file was deleted.

19 changes: 19 additions & 0 deletions src/components/InlineErrorText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import {TextStyle} from 'react-native';
import styles from '../styles/styles';
import Text from './Text';

type InlineErrorTextProps = {
children: React.ReactNode;
styles: TextStyle[];
};
function InlineErrorText(props: InlineErrorTextProps) {
if (!props.children) {
return null;
}

return <Text style={[...props.styles, styles.formError, styles.mt1]}>{props.children}</Text>;
}

InlineErrorText.displayName = 'InlineErrorText';
export default InlineErrorText;

0 comments on commit 2cdea51

Please sign in to comment.