1.0.1 • Published 2 years ago

@dash-ui/responsive v1.0.1

Weekly downloads
11
License
MIT
Repository
github
Last release
2 years ago

A library for adding responsive styles to components with dash-ui

npm i @dash-ui/responsive

Quick start

import {styles} from '@dash-ui/styles'
import responsive from '@dash-ui/responsive'

const responsiveStyle = responsive(styles, {
  phone: 'only screen and (min-width: 0em)'
  tablet: 'only screen and (min-width: 20em)'
  desktop: 'only screen and (min-width: 50em)'
})

const myResponsiveStyle = responsiveStyle.variants({
  default: {
    display: 'block'
  },
  flex: {
    display: 'flex'
  }
})

const MyComponent = ({display}) => {
  return <div className={myResponsiveStyle(display)}/>
}

<MyComponent display={{phone: 'default', tablet: 'flex'}}/>

API

responsive.variants()

Arguments

NameTypeDefaultRequired?Description

responsive.lazy()

responsive.one()

responsive.cls()

LICENSE

MIT

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.5

3 years ago

1.0.0-alpha.4

3 years ago

1.0.0-alpha.3

3 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago