diff --git a/src/components/CreateNewModal.jsx b/src/components/CreateNewModal.jsx index 088c4bc..57459cd 100644 --- a/src/components/CreateNewModal.jsx +++ b/src/components/CreateNewModal.jsx @@ -3,8 +3,18 @@ import Modal from './Modal'; import { ItemTile } from './ItemTile'; import templates from '../templateList'; import { Divider } from './common'; +import Switch from './Switch'; export class CreateNewModal extends Component { + constructor(props) { + super(props); + this.modeChangeHandler = this.modeChangeHandler.bind(this); + } + modeChangeHandler(e) { + this.setState({ + isFileModeSelected: e.target.checked + }); + } render() { const { show, @@ -16,41 +26,179 @@ export class CreateNewModal extends Component { } = this.props; return ( +

Create New

-
- +
+ { + this.setState({ isFileModeSelected: false }); + }} + > + + + + + + + + + + + + + + +

- This gives you 3 separate panes to write HTML, CSS and JavaScript. - Good for quickly testing something. + 3 separate panes to write HTML, CSS and JavaScript. Good for + quickly testing something.

- - Or choose from a template: -
- {templates.map(template => ( - +
+ +
+
+ { + this.setState({ isFileModeSelected: true }); + }} + > + + - ))} -
-
-
- -
-
- + + + + + + + +

Manage your code in files. Just like you would have files on your local machine.

- - Templates coming soon! +
+
+ + +
+ +
+ Or choose from a template: +
+ {templates.map(template => ( + + ))}
diff --git a/src/components/Switch.jsx b/src/components/Switch.jsx index b56c282..dea1545 100644 --- a/src/components/Switch.jsx +++ b/src/components/Switch.jsx @@ -1,35 +1,43 @@ -import { h, Component } from 'preact'; +import { h } from 'preact'; -export default class Switch extends Component { - render() { - return ( - + ); } diff --git a/src/style.css b/src/style.css index d123fa6..5e975e3 100644 --- a/src/style.css +++ b/src/style.css @@ -322,6 +322,7 @@ a > svg { .check-switch__status { text-transform: uppercase; + white-space: nowrap; font-size: 14px; font-weight: 600; }