2021-10-28 17:49:08 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { UnorderedList as UnorderedListProps } from '@rocket.chat/message-parser';
|
|
|
|
import { View, Text } from 'react-native';
|
|
|
|
|
|
|
|
import Inline from './Inline';
|
|
|
|
import styles from '../styles';
|
2022-04-28 18:44:40 +00:00
|
|
|
import { themes } from '../../../lib/constants';
|
2021-10-28 17:49:08 +00:00
|
|
|
import { useTheme } from '../../../theme';
|
|
|
|
|
|
|
|
interface IUnorderedListProps {
|
|
|
|
value: UnorderedListProps['value'];
|
|
|
|
}
|
|
|
|
|
2022-03-29 18:53:27 +00:00
|
|
|
const UnorderedList = ({ value }: IUnorderedListProps) => {
|
2021-10-28 17:49:08 +00:00
|
|
|
const { theme } = useTheme();
|
|
|
|
return (
|
|
|
|
<View>
|
|
|
|
{value.map(item => (
|
|
|
|
<View style={styles.row}>
|
2022-03-29 18:53:27 +00:00
|
|
|
<Text style={[styles.text, { color: themes[theme].bodyText }]}>- </Text>
|
2022-11-30 18:35:17 +00:00
|
|
|
<Text style={{ color: themes[theme].bodyText }}>
|
|
|
|
<Inline value={item.value} />
|
|
|
|
</Text>
|
2021-10-28 17:49:08 +00:00
|
|
|
</View>
|
|
|
|
))}
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default UnorderedList;
|