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 React, {Component} from 'react';
|
||||||
import {Grid, Card, Form} from 'tabler-react';
|
import {Grid, Card, Form} from 'tabler-react';
|
||||||
|
|
||||||
|
require('./Console.css');
|
||||||
|
|
||||||
const CommandResult = ({result}) => (
|
const CommandResult = ({result}) => (
|
||||||
<p className="text__new-line">{result}</p>
|
<p className="text__new-line">{result}</p>
|
||||||
);
|
);
|
||||||
@ -28,23 +30,25 @@ class Console extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Grid.Row cards>
|
<Grid.Row cards className="console">
|
||||||
<Grid.Col>
|
<Grid.Col>
|
||||||
<Card>
|
<Card>
|
||||||
<Card.Header>
|
<Card.Header>
|
||||||
<Card.Title>Embark console</Card.Title>
|
<Card.Title>Embark console</Card.Title>
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<Card.Body>
|
<Card.Body className="console--results">
|
||||||
<div>
|
<div>
|
||||||
{this.props.commands.map((command, index) => <CommandResult key={index} result={command.result} />)}
|
{this.props.commands.map((command, index) => <CommandResult key={index} result={command.result} />)}
|
||||||
</div>
|
</div>
|
||||||
|
</Card.Body>
|
||||||
|
<Card.Footer>
|
||||||
<Form onSubmit={(event) => this.handleSubmit(event)}>
|
<Form onSubmit={(event) => this.handleSubmit(event)}>
|
||||||
<Form.Input value={this.state.value}
|
<Form.Input value={this.state.value}
|
||||||
onChange={(event) => this.handleChange(event)}
|
onChange={(event) => this.handleChange(event)}
|
||||||
name="command"
|
name="command"
|
||||||
placeholder="Type a command (e.g help)" />
|
placeholder="Type a command (e.g help)" />
|
||||||
</Form>
|
</Form>
|
||||||
</Card.Body>
|
</Card.Footer>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid.Row>
|
</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