JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q47298F
  • License MIT

Create margins and paddings in React Native in the way well known from CSS

Package Exports

  • marginally-pudding

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (marginally-pudding) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Marginally Pudding

NPM version NPM downloads NPM license run in expo snack Codecov Travis

About

Create margins and paddings in React Native in the way well known from CSS

How to Install

First, install the library in your project by npm:

$ npm install marginally-pudding

Or Yarn:

$ yarn add marginally-pudding

Getting Started

• Connect libary with project using ES6 import:

import { marginally, pudding } from 'marginally-pudding'

Options

You can use functions with next combinations:

  • (all)
  • (vertical, horizontal)
  • (top, horizontal, bottom)
  • (top, right, bottom, left)

All params are number or string type

Example

import React from 'react'
import { View } from 'react-native'
import { marginally, pudding } from 'marginally-pudding'

const App = () => {
  return (
    <View
      style={{
        backgroundColor: 'red',
        ...marginally(20, 10),
        // marginVertical: 20,
        // marginHorizontal: 10,

        ...pudding(0, 20, 15),
        // paddingTop: 0,
        // paddingHorizontal: 20,
        // paddingBottom: 15,
      }}
    />
  )
}

License

This project is licensed under the MIT License © 2021-present Jakub Biesiada