diff --git a/.eslintignore b/.eslintignore
index ed05d93..962e4d6 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,4 @@
node_modules
example/bundle.js
+example/frame-bundle.js
dist
diff --git a/.gitignore b/.gitignore
index 00e7a7f..f5e87eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
node_modules
/dist
/example/bundle.js
-/generated-docs.md
+/example/frame-bundle.js
.eslintcache
package-lock.json
diff --git a/example/.babelrc.js b/example/.babelrc.js
new file mode 100644
index 0000000..d7ccfcd
--- /dev/null
+++ b/example/.babelrc.js
@@ -0,0 +1 @@
+module.exports = require('../.babelrc');
diff --git a/example/app.js b/example/app.js
new file mode 100644
index 0000000..6daaae5
--- /dev/null
+++ b/example/app.js
@@ -0,0 +1,42 @@
+/* eslint-env browser */
+/* eslint-disable jsx-a11y/label-has-for */
+import React from 'react';
+import ReactDOM from 'react-dom';
+
+class MainApp extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ large: true,
+ };
+
+ this.handleChange = this.handleChange.bind(this);
+ }
+
+ handleChange(event) {
+ this.setState({
+ large: event.target.checked,
+ });
+ }
+
+ render() {
+ return (
+
+
+
+
+
+
+
+ );
+ }
+}
+
+ReactDOM.render(, document.getElementById('example'));
diff --git a/example/frame.html b/example/frame.html
new file mode 100644
index 0000000..79dbfa5
--- /dev/null
+++ b/example/frame.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/example/frame.js b/example/frame.js
new file mode 100644
index 0000000..0b6e60d
--- /dev/null
+++ b/example/frame.js
@@ -0,0 +1,23 @@
+/* eslint-env browser */
+import React from 'react';
+import ReactDOM from 'react-dom';
+import MediaQuery from '../';
+
+const FrameApp = () => (
+
+
(
+ Matches: {JSON.stringify(matches)}
+ )}
+ />
+
+ Big screen!
+
+
+ Small screen!
+
+
+);
+
+ReactDOM.render(, document.getElementById('example'));
diff --git a/example/index.html b/example/index.html
new file mode 100644
index 0000000..feff362
--- /dev/null
+++ b/example/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+ @u-wave/react-mq example
+
+
+
+
+
+
+
+
+
diff --git a/example/package.json b/example/package.json
new file mode 100644
index 0000000..98df88d
--- /dev/null
+++ b/example/package.json
@@ -0,0 +1,25 @@
+{
+ "private": true,
+ "name": "@u-wave/react-mq-example",
+ "description": "react-mq example.",
+ "version": "0.0.0-example",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "postinstall": "npm run build",
+ "build": "npm run build:frame && npm run build:main",
+ "build:main": "cross-env BABEL_ENV=cjs browserify -t babelify frame.js > frame-bundle.js",
+ "build:frame": "cross-env BABEL_ENV=cjs browserify -t babelify app.js > bundle.js",
+ "start": "ecstatic ."
+ },
+ "dependencies": {
+ "ecstatic": "^3.0.0",
+ "react": "^16.0.0",
+ "react-dom": "^16.0.0"
+ },
+ "devDependencies": {
+ "@babel/core": "7.0.0-beta.51",
+ "babelify": "^9.0.0",
+ "browserify": "^16.0.0",
+ "cross-env": "^5.1.6"
+ }
+}