diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-22 01:31:18 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-22 01:31:18 +0200 |
| commit | ec598c5bbc692fc473fbed411d05b07d137b8e14 (patch) | |
| tree | 4d0735f5d270ae7b8a54781a28c278517450edc0 /client/components/Modal.jsx | |
| parent | 50f562afc47adfb222f18375236becab6af6f948 (diff) | |
more css :)
Diffstat (limited to 'client/components/Modal.jsx')
| -rw-r--r-- | client/components/Modal.jsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/components/Modal.jsx b/client/components/Modal.jsx index fded5e2..2d7cc13 100644 --- a/client/components/Modal.jsx +++ b/client/components/Modal.jsx @@ -1,5 +1,6 @@ import { h, Component } from 'preact' import { Link } from 'react-router-dom' +import { randrange } from '../util' export default class Modal extends Component { render() { @@ -14,7 +15,7 @@ export default class Modal extends Component { ? 'modal visible' : 'modal' - const style = 'background-color:hsl(' + randint(360) + ',20%,95%)' + const style = 'background-color:hsl(' + randrange(0,140) + ',100%,98%)' return ( <div class={className} style={style}> @@ -25,6 +26,3 @@ export default class Modal extends Component { ) } } - -function randint(n){ return (Math.random()*n)|0 } -function randrange(n){ return (Math.random()*n)|0 }
\ No newline at end of file |
