Refactor the right navigation

This commit is contained in:
Andre Medeiros 2018-10-24 13:37:40 -04:00
parent 7eb87f1a25
commit 69482bda42
1 changed files with 18 additions and 21 deletions

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Row, Label, Col, Button} from 'reactstrap'; import {Row, Label, Col, Button, Nav, NavLink} from 'reactstrap';
import FontAwesomeIcon from 'react-fontawesome'; import FontAwesomeIcon from 'react-fontawesome';
import { AppSwitch } from '@coreui/react' import { AppSwitch } from '@coreui/react'
@ -26,26 +26,23 @@ const TextEditorToolbar = (props) => (
</Button> </Button>
</Col> </Col>
<Col sm={4} md={4}> <Col sm={4} md={4}>
<div className="float-right mr-2"> <div className="float-right mr-2 btn-group">
{props.isContract && <Nav>
<React.Fragment> {props.isContract &&
<Button size="sm" color="primary" onClick={() => props.openAsideTab('overview')}> <React.Fragment>
Overview <NavLink href="#" onClick={() => props.openAsideTab('overview')}>
</Button> <FontAwesomeIcon className="mr-2" name="info-circle" /> Overview
<span className="mx-2">|</span> </NavLink>
<Button size="sm" color="primary" onClick={() => props.openAsideTab('detail')}> <NavLink href="#" onClick={() => props.openAsideTab('detail')}>
Detail <FontAwesomeIcon className="mr-2" name="file-text-o" /> Details
</Button> </NavLink>
<span className="mx-2">|</span> <NavLink href="#" onClick={() => props.openAsideTab('logger')}>Logger</NavLink>
<Button size="sm" color="primary" onClick={() => props.openAsideTab('logger')}> </React.Fragment>
Logger }
</Button> <NavLink href="#" onClick={() => props.openAsideTab('browser')}>
<span className="mx-2">|</span> <FontAwesomeIcon className="mr-2" name="compass" /> Browser
</React.Fragment> </NavLink>
} </Nav>
<Button size="sm" color="primary" onClick={() => props.openAsideTab('browser')}>
Browser
</Button>
</div> </div>
</Col> </Col>
</Row> </Row>