small-medium-large-xlarge

1.0.3 • Public • Published

small-medium-large-xlarge

npm travis standard

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.

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i small-medium-large-xlarge

Weekly Downloads

1

Version

1.0.3

License

ISC

Last publish

Collaborators

  • bentatum