Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
step-scale
Advanced tools
npm i step-scale
- OR - yarn add step-scale
import { StyleSheet } from "react-native"
import { hScale, vScale, fScale } from "step-scale"
/*
Basic Scalers:
hScale: Horizontal Scaler.
vScale: Vertical Scaler.
fScale: FontSize Scaler.
*/
const styles = StyleSheet.create({
myView: {
width: hScale(150),
height: vScale(90),
backgroundColor: "grey"
},
myText: {
fontSize: fScale(15),
color: "green"
}
})
import { StyleSheet } from "react-native"
import { sWidth, sHeight } from "step-scale"
/*
Constants:
sWidth: Screen Width value.
sHeight: Screen Height value.
*/
const styles = StyleSheet.create({
myScreenContainer: {
width: sWidth,
height: sHeight,
backgroundColor: "grey"
}
})
import { StyleSheet } from "react-native"
import { rcScale, sqScale, crScale, tScale } from "step-scale"
/*
Extras:
Shapes Generator
rcScale: generates scaled Rectangle.
sqScale: generates scaled Square.
crScale: generates scaled Circle.
Extra Size Scaler:
tScale: Total Size Scaler.
*/
const styles = StyleSheet.create({
myBlueRecatngle: {
// params (width, height)
...rcScale(150, 90),
backgroundColor: "blue"
},
myGreenSquare: {
...sqScale(150),
backgroundColor: "green"
},
myRedCircle: {
...crScale(150),
backgroundColor: "red"
},
myView: {
width: tScale(1.5),
height: tScale(2.9),
backgroundColor: "grey"
},
})
FAQs
React Native Scale Converters
The npm package step-scale receives a total of 1 weekly downloads. As such, step-scale popularity was classified as not popular.
We found that step-scale demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.