diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-26 01:28:41 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-26 01:28:41 +0200 |
| commit | 8d06839056967e8786c63976545aff098ae2f128 (patch) | |
| tree | 51c83236b2dcc5a6adabb1b4036eccfff63b9ef5 /app/client/modules/morph/index.js | |
| parent | bd354556f98aa724dd6cee03a1828bd40ce01f33 (diff) | |
morph module.. enum method for sliders
Diffstat (limited to 'app/client/modules/morph/index.js')
| -rw-r--r-- | app/client/modules/morph/index.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/client/modules/morph/index.js b/app/client/modules/morph/index.js new file mode 100644 index 0000000..9c90848 --- /dev/null +++ b/app/client/modules/morph/index.js @@ -0,0 +1,37 @@ +import { h, Component } from 'preact' +import { Route, Link } from 'react-router-dom' + +import actions from '../../actions' + +import util from '../../util' + +import MorphApp from './views/morph.app' + +class router { + componentWillMount(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + componentWillReceiveProps(){ + actions.system.changeTool('morph') + document.body.style.backgroundImage = 'linear-gradient(' + (util.randint(40)+40) + 'deg, #def, #dfe)' + } + render(){ + return ( + <section> + <Route exact path='/morph/app/' component={MorphApp} /> + </section> + ) + } +} + +function links(){ + return [ + { url: '/morph/app/', name: 'morph' }, + ] +} + +export default { + name: 'morph', + router, links, +} |
