Skip to content

Commit

Permalink
Merge pull request Expensify#30641 from JKobrynski/migrateUnorderedLi…
Browse files Browse the repository at this point in the history
…stToTypeScript

[TS Migration] migrate UnorderedList.js to TypeScript
  • Loading branch information
Gonals authored Nov 30, 2023
2 parents 0389d5b + 5be74c4 commit e2f4214
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/components/UnorderedList.js

This file was deleted.

26 changes: 26 additions & 0 deletions src/components/UnorderedList.tsx
Original file line number Diff line number Diff line change
@@ -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) => (
<View
key={itemText}
style={[styles.flexRow, styles.alignItemsStart, styles.ml2]}
>
<Text style={[styles.mr2]}>{'\u2022'}</Text>
<Text>{itemText}</Text>
</View>
));
}

UnorderedList.displayName = 'UnorderedList';
export default UnorderedList;

0 comments on commit e2f4214

Please sign in to comment.