ant-design / antd-mobile-samples

antd-mobile samples
1.14k stars 1.09k forks source link

RN自定义样式无效 #47

Closed stechrayo closed 6 years ago

stechrayo commented 6 years ago

我自己的代码按照Readme也未生效:

import listDefaultStyle from 'antd-mobile/lib/list/style/index.native';

const newListStyle = {
  ...listDefaultStyle,
  Item: {
    ...listDefaultStyle.Item,
    paddingLeft: 0,
    backgroundColor: 'red',
  },
}

<List styles={StyleSheet.create(newListStyle)}>
// ...
</List>
stechrayo commented 6 years ago

@silentcloud @paranoidjk

stechrayo commented 6 years ago

不好意思,我重新运行https://github.com/ant-design/antd-mobile-samples/tree/master/rn-custom-ui 又能正常显示自定义样式了。但是我自己项目在expo里还是不能显示定制样式

stechrayo commented 6 years ago

我把自定义的input放在我的工程里能正常显示自定义样式,那现在问题是,如何自定义List.Item的样式?

stechrayo commented 6 years ago

<Item style={styList.customItem}