erickzanardo / react-native-style-shortcuts

React Native style utilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native Style Shortcuts

This package offer some shortcuts for writing ReactNative styles, for example:

Instead of writing:

const styles = StyleSheet.create({
  container: {
    paddingTop: 1,
    paddingRight: 3,
    paddingBottom: 4,
    paddingLeft: 5,
  },
});

You could write the following:

const styles = StyleSheet.create({
  container: {
    ...padding(1, 3, 4, 5),
  },
});

Avaiable shortcuts:

  • padding
  • margin
  • borderRadius

About

React Native style utilities

License:MIT License


Languages

Language:JavaScript 100.0%