I have a react component that overlays a circle on to an image when the image is clicked. I am unable to find a good way to size the image, as it seems to only takes pxl as an value. I would like to make it the full width of the parent <Col>
element. I am using react-konva and react-bootstrap.
import { PageHeader, Grid, Row, Col,
ListGroup, ListGroupItem, Table, Panel,
ButtonToolbar, Button, Modal, FormGroup, FormControl, HelpBlock, ControlLabel}
from 'react-bootstrap';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
import {Stage, Layer, Rect, Line, Image, Circle} from 'react-konva';
<Grid>
<Row>
<PageHeader>System Boards<small> {this.state.name}</small></PageHeader>
<Col md={6}>
<Stage height="100" width="100">
<Layer>
<Image
image={this.state.image}
height="100"
width="100"
onClick={ (event) => {
this.handleClickImage(event);
}}
onTap={ (event) => {
this.handleClickImage(event);
}}
/>
</Layer>
{this.state.moves}
</Stage>
</Col>
<Col md={6}>
You can use react-bootsrap Media Content for image sizing. You shoud have a non displaying version of the image out of canvas so when you click on thumbnail you can change the visibility.