0.0.45 • Published 2 months ago

@hanwenbo/ui-mobile v0.0.45

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

数组操作

📦 安装

// npm
npm install @hanwenbo/ui-mobile --save

// yarn
yarn add @hanwenbo/ui-mobile

🔨 使用

import { Colors, Typography, Spacings } from "@hanwenbo/ui-mobile";
// import { ThemeManager } from "react-native-ui-lib";
// Load your foundations and presets (colors, typography, spacings, etc...)
Colors.loadColors({
  primaryColor: "#2364AA",
  secondaryColor: "#81C3D7",
  textColor: "##221D23",
  errorColor: "#E63B2E",
  successColor: "#ADC76F",
  warnColor: "##FF963C",
});

Typography.loadTypographies({
  heading: { fontSize: 16, fontWeight: "600" },
  subheading: { fontSize: 14 },
  body: { fontSize: 14 },
  description: { fontSize: 14, color: "#666" },
  h1: { fontSize: 38, lineHeight: 46, color: "#000", fontWeight: "600" },
  h2: { fontSize: 30, lineHeight: 40, color: "#000", fontWeight: "600" },
  h3: { fontSize: 30, lineHeight: 32, color: "#000", fontWeight: "600" },
  h4: { fontSize: 20, lineHeight: 28, color: "#000", fontWeight: "600" },
  h5: { fontSize: 16, lineHeight: 24, color: "#000", fontWeight: "600" },
});

Spacings.loadSpacings({
  page: 15,
  card: 15,
  gridGutter: 15,
});



// with a dynamic function
ThemeManager.setComponentTheme("Button", (props, context) => {
  // 'square' is not an original Button prop, but a custom prop that can
  // be used to create different variations of buttons in your app
  if (props.square) {
    return {
      borderRadius: 0,
    };
  }
});

export const Theme = {};

For example, the following line

<Text h1 pink>Hello World</Text>
0.0.45

2 months ago

0.0.41

8 months ago

0.0.43

7 months ago

0.0.37

11 months ago

0.0.35

12 months ago

0.0.36

11 months ago

0.0.34

1 year ago

0.0.32

1 year ago

0.0.33

1 year ago

0.0.31

2 years ago

0.0.32-alpha.0

2 years ago

0.0.30

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.11

2 years ago