Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haxe-react/haxe-react-media
CSS media queries for Haxe React.
https://github.com/haxe-react/haxe-react-media
haxe media-queries reactjs
Last synced: about 1 month ago
JSON representation
CSS media queries for Haxe React.
- Host: GitHub
- URL: https://github.com/haxe-react/haxe-react-media
- Owner: haxe-react
- License: mit
- Created: 2018-01-08T10:32:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T13:23:55.000Z (over 5 years ago)
- Last Synced: 2024-11-23T05:31:28.816Z (about 2 months ago)
- Topics: haxe, media-queries, reactjs
- Language: Haxe
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Haxe react media
A haxe-only version of the
[`react-media`](https://www.npmjs.com/package/react-media) npm package, a CSS
media query component for React..A `` component listens for matches to a CSS media query and renders
stuff based on whether the query matches or not.## Getting Started
### Installing
```
haxelib install react-media
```No need for the npm package, this version is haxe-only.
### Usage with React
```haxe
import react.ReactComponent;
import react.ReactMacro.jsx;
import react.media.Media;class MyComponent extends ReactComponent {
override public function render() {
return jsx('
<$Media query="(min-width: 42em)">
The answer
$Media>
');
}
}
```See [React-Training/react-media](https://github.com/ReactTraining/react-media)
for more documentation.