diff --git a/src/components/UnorderedList.js b/src/components/UnorderedList.js deleted file mode 100644 index c3300c11aae0..000000000000 --- a/src/components/UnorderedList.js +++ /dev/null @@ -1,37 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import {View} from 'react-native'; -import _ from 'underscore'; -import useThemeStyles from '@styles/useThemeStyles'; -import Text from './Text'; - -const propTypes = { - /** An array of strings to display as an unordered list */ - items: PropTypes.arrayOf(PropTypes.string), -}; -const defaultProps = { - items: [], -}; - -function UnorderedList(props) { - const styles = useThemeStyles(); - return ( - <> - {_.map(props.items, (itemText) => ( - - {'\u2022'} - {itemText} - - ))} - - ); -} - -UnorderedList.displayName = 'UnorderedList'; -UnorderedList.propTypes = propTypes; -UnorderedList.defaultProps = defaultProps; - -export default UnorderedList; diff --git a/src/components/UnorderedList.tsx b/src/components/UnorderedList.tsx new file mode 100644 index 000000000000..a51cefce9ce6 --- /dev/null +++ b/src/components/UnorderedList.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import {View} from 'react-native'; +import useThemeStyles from '@styles/useThemeStyles'; +import Text from './Text'; + +type UnorderedListProps = { + /** An array of strings to display as an unordered list */ + items?: string[]; +}; + +function UnorderedList({items = []}: UnorderedListProps) { + const styles = useThemeStyles(); + + return items.map((itemText) => ( + + {'\u2022'} + {itemText} + + )); +} + +UnorderedList.displayName = 'UnorderedList'; +export default UnorderedList;