1.3.57 • Published 1 year ago

@qonsoll/react-native-design v1.3.57

Weekly downloads
388
License
MIT
Repository
-
Last release
1 year 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

1 year ago

1.3.55

2 years ago

1.3.56

2 years ago

1.3.50

2 years ago

1.3.53

2 years ago

1.3.54

2 years ago

1.3.51

2 years ago

1.3.52

2 years ago

1.3.42

2 years ago

1.3.43

2 years ago

1.3.41

2 years ago

1.3.46

2 years ago

1.3.47

2 years ago

1.3.44

2 years ago

1.3.45

2 years ago

1.3.48

2 years ago

1.3.49

2 years ago

1.3.39

3 years ago

1.3.38

3 years ago

1.3.40

3 years ago

1.3.35

3 years ago

1.3.36

3 years ago

1.3.37

3 years ago

1.3.20

3 years ago

1.3.21

3 years ago

1.3.24

3 years ago

1.3.25

3 years ago

1.3.22

3 years ago

1.3.23

3 years ago

1.3.28

3 years ago

1.3.29

3 years ago

1.3.26

3 years ago

1.3.27

3 years ago

1.3.31

3 years ago

1.3.32

3 years ago

1.3.30

3 years ago

1.3.33

3 years ago

1.3.34

3 years ago

1.3.17

3 years ago

1.3.18

3 years ago

1.3.16

3 years ago

1.3.19

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.10

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.15

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.3.5

3 years ago

1.2.6

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1-beta

3 years ago

1.3.0-beta

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.2.1

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago