Ant-design-mobile: How to theme react-native components

Created on 4 Jan 2017  ·  3Comments  ·  Source: ant-design/ant-design-mobile

we use less-loader to replace variables for web components. but how about for react-native (which uses js to style files)? how can I customize the color/size/shape of react-native components components?

question react native

All 3 comments

It's mostly the same as web. Like this:

import vars from 'antd-mobile/lib/style/themes/default';
export default Object.assign({
  color_text_base: '#xxx',
  ...
}, vars);

See https://github.com/warmhug/__/tree/master/_react/antd_custom_ui for more information.
And we will make an example specifically for RN in the next few weeks.

Ref #560

RN 自定义组件样式 和 自定义 theme 方案见 demo: https://github.com/ant-design/antd-mobile-samples/tree/master/rn-custom-ui

Was this page helpful?
0 / 5 - 0 ratings