样式规范

Install

  1. npm install beeshell

Usage

引入方式

  1. import { setVaribles, colors, fontSize, padding } from 'beeshell/common/styles/varibles';

Examples

自定义主题

image vs
image

代码如下:

  1. setVaribles({
  2. colors: {
  3. brandPrimary: '#337ab7',
  4. brandSuccess: '#5cb85c',
  5. brandInfo: '#01c2ff',
  6. brandWarning: '#f0ad4e',
  7. brandDanger: '#d9534f',
  8. },
  9. fontSize: {
  10. base: 18,
  11. small: 14,
  12. h5: 20,
  13. }
  14. });

Code

  1. import { setVaribles, colors, fontSize, padding } from 'beeshell/common/styles/varibles';
  2. class App extends React.Component {
  3. render() {
  4. <View>
  5. <Text style={{
  6. color: colors.brandPrimary,
  7. paddingVertical: padding.verticalBase,
  8. fontSize: fontSize.h5
  9. }}>文本内容</Text>
  10. </View>
  11. }
  12. }