/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
fixtures/fiber-debugger/src/Editor.js
39 строк
813 B
Brandon Dail
Run all fixtures through Prettier (#10157)
12 июл 2017, 19:19
12 июл 2017, 19:19
d04618b
Код
Авторство
О чём код?
import React, {Component} from 'react'; class Editor extends Component { constructor(props) { super(props); this.state = { code: props.code, }; } render() { return ( <div style={{ height: '100%', width: '100%', }}> <textarea value={this.state.code} onChange={e => this.setState({code: e.target.value})} style={{ height: '80%', width: '100%', fontSize: '15px', }} /> <div style={{height: '20%', textAlign: 'center'}}> <button onClick={() => this.props.onClose(this.state.code)} style={{fontSize: 'large'}}> Run </button> </div> </div> ); } } export default Editor;