1.3.57 • Published 3 years ago

@qonsoll/react-native-design v1.3.57

Weekly downloads
388
License
MIT
Repository
-
Last release
3 years ago

About @qonsoll/react-native-design

This is components library with possibility to configure everything you need. ⚡️⚡️⚡️ Using it you can extend or/and override any part of any element inside the lib (borders (radius, colors, width), font families for titles or body text, font sizes, line heights, letter spacings, color scheme 🎨 etc. (probably all properties that you can imagine and available in react-native apps)). Also, you can use bootstrap like grid (Row, Col with embedded flex configurations).

How to install?

  1. Run in terminal: npm install @qonsoll/react-native-design or yarn add @qonsoll/react-native-design

  2. Install additional packages: npm install --save @react-native-community/checkbox react-native-date-picker react-native-image-picker react-native-svg react-native-svg-transformer react-native-vector-icons or yarn add @react-native-community/checkbox react-native-date-picker react-native-image-picker react-native-svg react-native-svg-transformer react-native-vector-icons

  3. Install pods for iOS application: cd ios && pod install && cd ..

  4. If you want to use default SVG icons, change your metro.config.js file:

const {getDefaultConfig} = require('metro-config');
module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
};
module.exports = (async () => {
  const {
    resolver: {sourceExts, assetExts},
  } = await getDefaultConfig();

  return {
    transformer: {
      babelTransformerPath: require.resolve('react-native-svg-transformer'),
    },
    resolver: {
      assetExts: assetExts.filter((ext) => ext !== 'svg'),
      sourceExts: [...sourceExts, 'svg'],
    },
  };
})();
  1. Well done! ✅ Now you can setup ThemeProvider, configure Theme and use components.

How to use?

  1. Import ThemeProvider in your App.js file: import {ThemeProvider} from '@qonsoll/react-native-design'

  2. Wrap your app content:

<ThemeProvider theme={{}}>
	<App />
</ThemeProvider>
  1. Success! 👍 Now all lib elements should have access to the default theme.

Theme (design-tokens)

Here is default theme state:

const Theme = {
  CORE: {
    BORDER_RADIUSES: {},
    BORDER_WIDTHS: {},
    COLORS: {},
    FONT_FAMILIES: {},
    FONT_SIZES: {},
    FONT_WEIGHTS: {},
    LETTER_SPACINGS: {},
    LINE_HEIGHTS: {},
    SHADOWS: {},
    ICON_SIZES: {}
  },
  EXTENSIONS: {
    CORNERS: {}
  },
  components: {
    BUTTONS: {},
    SWITCHES: {},
    CARDS: {},
    ITEMS: {},
    BUTTON_ITEMS: {},
    ALERTS: {},
    AVATARS: {},
    BADGES: {},
    CHECKBOXES: {},
    COLLAPSES: {},
    TOGGLES: {},
    STATUSES: {}
  }
}
1.3.57

3 years ago

1.3.55

3 years ago

1.3.56

3 years ago

1.3.50

4 years ago

1.3.53

4 years ago

1.3.54

4 years ago

1.3.51

4 years ago

1.3.52

4 years ago

1.3.42

4 years ago

1.3.43

4 years ago

1.3.41

4 years ago

1.3.46

4 years ago

1.3.47

4 years ago

1.3.44

4 years ago

1.3.45

4 years ago

1.3.48

4 years ago

1.3.49

4 years ago

1.3.39

4 years ago

1.3.38

4 years ago

1.3.40

4 years ago

1.3.35

4 years ago

1.3.36

4 years ago

1.3.37

4 years ago

1.3.20

4 years ago

1.3.21

4 years ago

1.3.24

4 years ago

1.3.25

4 years ago

1.3.22

4 years ago

1.3.23

4 years ago

1.3.28

4 years ago

1.3.29

4 years ago

1.3.26

4 years ago

1.3.27

4 years ago

1.3.31

4 years ago

1.3.32

4 years ago

1.3.30

4 years ago

1.3.33

4 years ago

1.3.34

4 years ago

1.3.17

4 years ago

1.3.18

4 years ago

1.3.16

4 years ago

1.3.19

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.10

4 years ago

1.3.13

4 years ago

1.3.14

4 years ago

1.3.11

4 years ago

1.3.12

4 years ago

1.3.15

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.3.5

4 years ago

1.2.6

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1-beta

4 years ago

1.3.0-beta

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.2.1

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago