README
small-medium-large-xlarge
given a set of screen widths and a screen width value, this will tell you if your screen is small, medium, large or extra large.
Install
npm install small-medium-large-xlarge
Usage
import { getScreenSize } from 'small-medium-large-xlarge'
const breakpoints = {
small: 420,
medium: 768,
large: 1024
}
const screenSize = getScreenSize(400, breakpoints) // 'small'
const screenSize = getScreenSize(700, breakpoints) // 'medium'
const screenSize = getScreenSize(1000, breakpoints) // 'large'
const screenSize = getScreenSize(1200, breakpoints) // 'xlarge'
Contributing
Contributions welcome! Please read the contributing guidelines first.