🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

mkp-react-native-style-helper

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mkp-react-native-style-helper

react native style helper

latest
Source
npmnpm
Version
1.2.2
Version published
Maintainers
2
Created
Source

react-native-style-helper

npm version npm license npm download npm download

Install

$ npm install mkp-react-native-style-helper --save

Support

android/ios

Quick Start

import {StyleSheet} from "react-native";
import {padding,margin,shadow} from "mkp-react-native-style-helper";

const styles=StyleSheet.create({
	style1:{
		...padding(10),
		...margin(10)
	},
	style2:{
		...padding(10,5),
		...margin(10,5)
	},
	style3:{
		...padding(1,2,3,4),
		...margin(1,2,3,4),
		...shadow()
	}
});

Methods

padding

support three styles

  • padding(all:Number)
  • padding(topAndBottom:Number,leftAndRight:Number)
  • padding(top:Number,right:Number,bottom:Number,left:Number)

margin

support three styles

  • margin(all:Number)
  • margin(topAndBottom:Number,leftAndRight:Number)
  • margin(top:Number,right:Number,bottom:Number,left:Number)

shadow (Only IOS)

shadow(color = "#000000", opacity = 0.2, radius = 1, offset={width:0,height:2})

getResponsiveValue

getResponsiveValue(value:Number,designDensity:Number=2,designScreenWidth:Number=375)

getResponsiveFontSize

getResponsiveFontSize(value:Number,designDensity:Number=2)

Keywords

react-native

FAQs

Package last updated on 23 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts