Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add a default unit to your react element's style

Remove warning from React by adding a default unit on your style

const defaultUnit = require('react-set-default-unit')
const userInputStyle = "20 0em 20px 0"

console.log(defaultUnit(userInputStyle, "px")) // 20px 0em 20px 0px

About

Set a default unit on a style attribute for a React element ( E.G. : user input style )

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages