【问题标题】:How to style react-native-sectioned-multi-select?如何设置 react-native-sectioned-multi-select 样式?
【发布时间】:2019-05-09 11:09:52
【问题描述】:

我在 react native 中使用 react-native-sectioned-multi-select。但是,我不能做任何风格。谁能帮我为这个定制和做造型?

https://www.npmjs.com/package/react-native-sectioned-multi-select?activeTab=readme

https://reactnativeexample.com/simple-multi-select-component-for-react-native/

【问题讨论】:

  • 创建一个 css 文件,使用 !importent 覆盖 css 并将该 css 文件导入 index.js。

标签: reactjs select native


【解决方案1】:
 styles={{
            // chipText: {
            //   maxWidth: Dimensions.get('screen').width - 90,
            // },
            // itemText: {
            //   color: this.state.selectedItems.length ? 'black' : 'lightgrey'
            // },
            selectedItemText: {
              color: 'blue',
            },
            // subItemText: {
            //   color: this.state.selectedItems.length ? 'black' : 'lightgrey'
            // },
            selectedSubItemText: {
              color: 'blue',
            },
          }}

[https://github.com/renrizzolo/react-native-sectioned-multi-select/blob/9c5f71852aef7a7ac03e7761d5dd810cd2ccef5d/exampleapp/App.js#L322-L397][1]

container
modalWrapper 
backdrop 
listContainer
selectToggle
selectToggleText
item
selectedItem
subItem
itemText selectedItemText
selectedSubItemText selectedSubItem subItemText
searchBar
center
separator
subSeparator
chipsWrapper
chipContainer parentChipContainer parentChipText chipText
chipIcon
searchTextInput
scrollView
button
confirmText
cancelButton
itemIconStyle

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-09-29
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 2022-08-10
    • 1970-01-01
    • 2018-08-26
    • 2018-01-22
    相关资源
    最近更新 更多