[FIX] Text color and fit content of TaskList (#4906)
* fix regression on plain text * update stories * fix where to add the color * fit content taskList --------- Co-authored-by: Reinaldo Neto <reinaldonetof@hotmail.com>
This commit is contained in:
parent
58f28fb488
commit
4686d4f6f8
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@ interface IPlainProps {
|
||||||
value: PlainProps['value'];
|
value: PlainProps['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Plain = ({ value }: IPlainProps) => (
|
const Plain = ({ value }: IPlainProps): React.ReactElement => (
|
||||||
<Text accessibilityLabel={value} style={styles.plainText}>
|
<Text accessibilityLabel={value} style={styles.plainText}>
|
||||||
{value}
|
{value}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { Tasks as TasksProps } from '@rocket.chat/message-parser';
|
||||||
|
|
||||||
import Inline from './Inline';
|
import Inline from './Inline';
|
||||||
import styles from '../styles';
|
import styles from '../styles';
|
||||||
import { themes } from '../../../lib/constants';
|
|
||||||
import { useTheme } from '../../../theme';
|
import { useTheme } from '../../../theme';
|
||||||
|
|
||||||
interface ITasksProps {
|
interface ITasksProps {
|
||||||
|
@ -12,13 +11,15 @@ interface ITasksProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
const TaskList = ({ value = [] }: ITasksProps) => {
|
const TaskList = ({ value = [] }: ITasksProps) => {
|
||||||
const { theme } = useTheme();
|
const { colors } = useTheme();
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
{value.map(item => (
|
{value.map(item => (
|
||||||
<View style={styles.row}>
|
<View style={styles.row}>
|
||||||
<Text style={[styles.text, { color: themes[theme].bodyText }]}>{item.status ? '- [x] ' : '- [ ] '}</Text>
|
<Text style={[styles.text, { color: colors.bodyText }]}>{item.status ? '- [x] ' : '- [ ] '}</Text>
|
||||||
<Inline value={item.value} />
|
<Text style={[styles.inline, { color: colors.bodyText }]}>
|
||||||
|
<Inline value={item.value} />
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
|
|
Loading…
Reference in New Issue