globocom / globocom/react-native-draftjs-render
support backgroundColor in custom styles
- 主要言語
- JavaScript
- スター
- 390
- フォーク
- 61
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hey,
I was wondering if it's possible to support the style prop `backgroundColor` for text blocks ?
Let's say I have those blocks:
```
0: {
data: {},
depth: 0,
entityRanges: [],
inlineStyleRanges: [],
key: "6dml9",
text: "Test",
type: "unstyled",
},
1: {
data: {},
depth: 0,
entityRanges: [{…}],
inlineStyleRanges: [],
key: "5dpc1",
text: "@Coco Jumbo",
type: "mention",
}
```
and this style:
```
mention: {
lineHeight: 26,
fontSize: 14,
fontWeight: 'normal',
backgroundColor: theme.color.blue.shade100,
}
```
I'd expect the `Text` component corresponding to the second block with the `mention` style to have the background color I gave it, and looking pretty much like that:

Do you think that would be possible ? I know the `backgroundColor` style prop works fine with `Text` components in react-native, but if you didn't handle it maybe there's a reason, I'm just curious to know if you could manage to support it or not.
Or maybe I am doing something wrong ?
Anyway, great work with this package ;)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。