mirror of https://github.com/embarklabs/embark.git
fix(cockpit): fix converter inputs and copy-button position
This commit is contained in:
parent
359c28f5b5
commit
35648eefa0
|
@ -1,7 +1,6 @@
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
InputGroup,
|
|
||||||
Card,
|
Card,
|
||||||
CardBody,
|
CardBody,
|
||||||
CardHeader,
|
CardHeader,
|
||||||
|
@ -9,7 +8,6 @@ import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Input,
|
Input,
|
||||||
Row,
|
Row,
|
||||||
InputGroupAddon,
|
|
||||||
Label
|
Label
|
||||||
} from 'reactstrap';
|
} from 'reactstrap';
|
||||||
import CopyButton from './CopyButton';
|
import CopyButton from './CopyButton';
|
||||||
|
@ -62,12 +60,10 @@ class Converter extends React.Component {
|
||||||
this.state.etherConversions.map(unit => (
|
this.state.etherConversions.map(unit => (
|
||||||
<FormGroup key={unit.key}>
|
<FormGroup key={unit.key}>
|
||||||
<Label htmlFor={unit.name}>{unit.name}</Label>
|
<Label htmlFor={unit.name}>{unit.name}</Label>
|
||||||
<InputGroup>
|
<div className="position-relative">
|
||||||
<Input id={unit.name} placeholder={unit.name} value={unit.value} onChange={e => this.handleOnChange(e, unit.key)} />
|
<Input id={unit.name} placeholder={unit.name} value={unit.value} onChange={e => this.handleOnChange(e, unit.key)} />
|
||||||
<InputGroupAddon addonType="append">
|
|
||||||
<CopyButton text={unit.value} title="Copy value to clipboard" size={2}/>
|
<CopyButton text={unit.value} title="Copy value to clipboard" size={2}/>
|
||||||
</InputGroupAddon>
|
</div>
|
||||||
</InputGroup>
|
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#root .copy-to-clipboard {
|
#root .copy-to-clipboard {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 1px;
|
||||||
top: 0;
|
top: 0.5px;
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
Loading…
Reference in New Issue