cccisd-responsive
The problem with css media queries and bootstrap responsive classes is that they depends on the screen size. But most of the time we need to create responsive react component based on the container size (for example, the size of a sidebar).
cccisd-responsive
provides you with the div wrapper where specific size class is applied.
Applied classes:
- size < 768px -
xsmall
- size >= 768px and < 992px -
small
- size >= 992px and < 1200px -
medium
- size >= 1200px -
large
You have to use cccisd-responsive
along with a css module stylesheet
Installation
Run command:
npm install cccisd-responsive --save
Usage
style.css
} }}}}
index.js
;;; Component { return <Responsive cssModule=style> <div className=styletitle> Some title which changes the font-size depends on the container size </div> </Responsive> ; }
Props
- cssModule - (type: object, default: null)
Css module stylesheet