1.0.3 • Published 8 years ago

small-medium-large-xlarge v1.0.3

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago