forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Expensify#30641 from JKobrynski/migrateUnorderedLi…
…stToTypeScript [TS Migration] migrate UnorderedList.js to TypeScript
- Loading branch information
Showing
2 changed files
with
26 additions
and
37 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |