Skip to content

Instantly share code, notes, and snippets.

@parshap
Created April 6, 2015 18:25
Show Gist options
  • Save parshap/0fd364176b5028acc577 to your computer and use it in GitHub Desktop.
Save parshap/0fd364176b5028acc577 to your computer and use it in GitHub Desktop.
"use strict";
// # Responsive Component
//
// A react component that will conditionally render children that correspond
// to the currently matching "named" media query.
//
// The predefined named media queries are: "small", "not-small", "medium", and
// "large". These correspond to CSS classes that end with "-ns", "-m", etc.
// suffixes.
//
// ## Example
//
// ```
// React.createElement(Responsive, {
// "small": ...
// "not-small": ...
// });
// ```
//
module.exports = React.createClass({
});
@samdalton
Copy link

So our mobile retire age would be something like

React.createElement(Responsive, {
  "small" : el("div", {children: "small age"}),
   "not-small" : el("div", {children: "not small age"})
});

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment