mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-05 11:54:02 +00:00
Adding overflow to console
This commit is contained in:
parent
bf5efab091
commit
64dea63457
4
embark-ui/src/components/Console.css
Normal file
4
embark-ui/src/components/Console.css
Normal file
@ -0,0 +1,4 @@
|
||||
.console--results {
|
||||
height: 200px;
|
||||
overflow-y: scroll;
|
||||
}
|
@ -2,6 +2,8 @@ import PropTypes from "prop-types";
|
||||
import React, {Component} from 'react';
|
||||
import {Grid, Card, Form} from 'tabler-react';
|
||||
|
||||
require('./Console.css');
|
||||
|
||||
const CommandResult = ({result}) => (
|
||||
<p className="text__new-line">{result}</p>
|
||||
);
|
||||
@ -28,23 +30,25 @@ class Console extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Grid.Row cards>
|
||||
<Grid.Row cards className="console">
|
||||
<Grid.Col>
|
||||
<Card>
|
||||
<Card.Header>
|
||||
<Card.Title>Embark console</Card.Title>
|
||||
</Card.Header>
|
||||
<Card.Body>
|
||||
<Card.Body className="console--results">
|
||||
<div>
|
||||
{this.props.commands.map((command, index) => <CommandResult key={index} result={command.result} />)}
|
||||
</div>
|
||||
</Card.Body>
|
||||
<Card.Footer>
|
||||
<Form onSubmit={(event) => this.handleSubmit(event)}>
|
||||
<Form.Input value={this.state.value}
|
||||
onChange={(event) => this.handleChange(event)}
|
||||
name="command"
|
||||
placeholder="Type a command (e.g help)" />
|
||||
</Form>
|
||||
</Card.Body>
|
||||
</Card.Footer>
|
||||
</Card>
|
||||
</Grid.Col>
|
||||
</Grid.Row>
|
||||
|
861
package-lock.json
generated
861
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user