From 2d08471313c03b9dd81ef285246f963de346acb4 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 17 Oct 2023 14:15:44 +0200 Subject: [PATCH] [TS migration] Migrate 'FixedFooter.js' component to TypeScript --- src/components/FixedFooter.js | 26 -------------------------- src/components/FixedFooter.tsx | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 26 deletions(-) delete mode 100644 src/components/FixedFooter.js create mode 100644 src/components/FixedFooter.tsx diff --git a/src/components/FixedFooter.js b/src/components/FixedFooter.js deleted file mode 100644 index bad2639ae7e8..000000000000 --- a/src/components/FixedFooter.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import {View} from 'react-native'; -import PropTypes from 'prop-types'; -import styles from '../styles/styles'; - -const propTypes = { - /** Children to wrap in FixedFooter. */ - children: PropTypes.node.isRequired, - - /** Styles to be assigned to Container */ - // eslint-disable-next-line react/forbid-prop-types - style: PropTypes.arrayOf(PropTypes.object), -}; - -const defaultProps = { - style: [], -}; - -function FixedFooter(props) { - return {props.children}; -} - -FixedFooter.propTypes = propTypes; -FixedFooter.defaultProps = defaultProps; -FixedFooter.displayName = 'FixedFooter'; -export default FixedFooter; diff --git a/src/components/FixedFooter.tsx b/src/components/FixedFooter.tsx new file mode 100644 index 000000000000..c44b9bf3d0e0 --- /dev/null +++ b/src/components/FixedFooter.tsx @@ -0,0 +1,19 @@ +import React, {ReactNode} from 'react'; +import {StyleProp, View, ViewStyle} from 'react-native'; +import styles from '../styles/styles'; + +type FixedFooterProps = { + /** Children to wrap in FixedFooter. */ + children: ReactNode; + + /** Styles to be assigned to Container */ + style: Array>; +}; + +function FixedFooter({style = [], children}: FixedFooterProps) { + return {children}; +} + +FixedFooter.displayName = 'FixedFooter'; + +export default FixedFooter;