Skip to content

Instantly share code, notes, and snippets.

@dariocravero
Created January 8, 2016 13:08
Show Gist options
  • Save dariocravero/90530fffdaaa0ff89e8c to your computer and use it in GitHub Desktop.
Save dariocravero/90530fffdaaa0ff89e8c to your computer and use it in GitHub Desktop.
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"app.com":[function(require,module,exports){
// app.js
var PanelsUi = require('panels-ui');
var React = require('react');
var lookup = [
'/hi-:name'
];
var panels = {
'/': {
type: 'Home'
},
'/hi-:name': {
props: {
'name': ':name'
},
type: 'Hi'
}
};
var types = {
'Home': function(props) {
return React.createElement(
PanelsUi.Panel,
{ style: { width: props.width } },
React.createElement(
PanelsUi.Action,
{href: 'hi-Dario'},
'Say hi to Dario'
),
React.createElement(
PanelsUi.Action,
{href: 'hi-Paul'},
'Say hi to Paul'
)
);
},
'Hi': function(props) {
return React.createElement(
PanelsUi.Panel,
{ style: { width: props.width } },
React.createElement(
PanelsUi.Action,
{href: '..'},
'Say hi to somebody else'
),
React.createElement(
'div',
{},
'Hi' + props.name
)
);
}
};
module.exports = {
lookup: lookup,
panels: panels,
types: types
};
},{"react":"react"}]},{},[]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment