import { h, Component } from 'preact'; import Modal from './Modal'; import { ItemTile } from './ItemTile'; import templates from '../templateList'; import { BetaTag } from './common'; import { trackEvent } from '../analytics'; import Tabs, { TabPanel } from './Tabs'; export class CreateNewModal extends Component { constructor(props) { super(props); this.modeChangeHandler = this.modeChangeHandler.bind(this); } modeChangeHandler(selectedtabIndex) { this.setState({ isFileModeSelected: !!selectedtabIndex }); trackEvent( 'ui', 'newCreationModeChange', !!selectedtabIndex ? 'files' : '3panes' ); } render() { const { show, closeHandler, onBlankTemplateSelect, onBlankFileTemplateSelect, onImportGithubRepoSelect, onTemplateSelect } = this.props; const option1 = (

3 separate panes to write HTML, CSS and JavaScript. Good for quickly testing something.

); const option2 = (

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

); return (

Create New

{templates.map(template => { return ( ); })}
{templates.map(template => { if (template.isFileModeSupported) { return ( ); } })}

2 files mode creations available in Free plan. To create unlimited files mode creations, become PRO.

Files modes is currently only available in Web app.{' '} Try the Web app now.
{/*

{this.state.isGhRepoInputVisible ? (

(this.ghRepoInput = el)} />
) : null}

*/}
); } }