В настоящее время я использую response-native-markdown-display для своих данных в чате. Но я не уверен, как добавить стиль для цветов границ таблицы, не говоря уже о документах. Я нашел способ изменить цвет внешних границ, но с нижней границей строки заголовка мне не повезло. Есть ли способ изменить его цвет?
Это уценка:
Это код, который я использую для настройки:
{props.message && (
<Markdown
style = {{
table: {
borderColor: "white",
color: "yellow",
borderBlockEndColor: "yellow",
borderStartColor: "yellow",
borderEndColor: "yellow",
},
}}>
{`
# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading
Unordered
+ Create a list by starting a line with
+ Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
* Ac tristique libero volutpat at
+ Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
+ Very easy!
Ordered
1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
Start numbering with offset:
57. foo
58. bar
| Option | Description |
| ------ | ----------- |
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
Right aligned columns
| Option | Description |
| ------:| -----------:|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
`}
</Markdown>
)}
Вы можете использовать tr
, чтобы стилизовать внутренние линии границ.
const styles = StyleSheet.create({
tableBorder: {
borderWidth: 1,
borderColor: '#FFF',
borderStyle: 'solid',
}
});
<Markdown
style = {{
table: styles.tableBorder,
tr: styles.tableBorder
}}>
{text}
</Markdown>
Да, это сработало : tr: { borderColor: "white", },
Я думаю, мне нужно найти код стиля, такой как borderBlockEndColor и т. д. Но пока не найден.