mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-03 09:24:25 +00:00
transform card view into a card; remove duplicated names per tab
This commit is contained in:
parent
b86761e83d
commit
315413a87e
@ -114,7 +114,6 @@ const ContractFunctions = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={12}><h1>{contractProfile.name} Functions</h1></Col>
|
|
||||||
{contractProfile.methods
|
{contractProfile.methods
|
||||||
.filter((method) => {
|
.filter((method) => {
|
||||||
return props.onlyConstructor ? method.type === 'constructor' : method.type !== 'constructor';
|
return props.onlyConstructor ? method.type === 'constructor' : method.type !== 'constructor';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
|
import { TabContent, TabPane, Nav, NavItem, NavLink, Card, CardBody, CardTitle } from 'reactstrap';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
import ContractOverview from '../components/ContractOverview';
|
import ContractOverview from '../components/ContractOverview';
|
||||||
@ -27,43 +27,48 @@ class ContractLayout extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Nav tabs>
|
<Card>
|
||||||
<NavItem>
|
<CardBody>
|
||||||
<NavLink
|
<CardTitle>{this.props.contract.className}</CardTitle>
|
||||||
className={classnames({ active: this.state.activeTab === '1' })}
|
<Nav tabs>
|
||||||
onClick={() => { this.toggle('1'); }}
|
<NavItem>
|
||||||
>
|
<NavLink
|
||||||
Overview
|
className={classnames({ active: this.state.activeTab === '1' })}
|
||||||
</NavLink>
|
onClick={() => { this.toggle('1'); }}
|
||||||
</NavItem>
|
>
|
||||||
<NavItem>
|
Overview
|
||||||
<NavLink
|
</NavLink>
|
||||||
className={classnames({ active: this.state.activeTab === '2' })}
|
</NavItem>
|
||||||
onClick={() => { this.toggle('2'); }}
|
<NavItem>
|
||||||
>
|
<NavLink
|
||||||
Functions
|
className={classnames({ active: this.state.activeTab === '2' })}
|
||||||
</NavLink>
|
onClick={() => { this.toggle('2'); }}
|
||||||
</NavItem>
|
>
|
||||||
<NavItem>
|
Functions
|
||||||
<NavLink
|
</NavLink>
|
||||||
className={classnames({ active: this.state.activeTab === '3' })}
|
</NavItem>
|
||||||
onClick={() => { this.toggle('3'); }}
|
<NavItem>
|
||||||
>
|
<NavLink
|
||||||
Logger
|
className={classnames({ active: this.state.activeTab === '3' })}
|
||||||
</NavLink>
|
onClick={() => { this.toggle('3'); }}
|
||||||
</NavItem>
|
>
|
||||||
</Nav>
|
Logger
|
||||||
<TabContent activeTab={this.state.activeTab}>
|
</NavLink>
|
||||||
<TabPane tabId="1">
|
</NavItem>
|
||||||
<ContractOverview contract={this.props.contract} />
|
</Nav>
|
||||||
</TabPane>
|
<TabContent activeTab={this.state.activeTab}>
|
||||||
<TabPane tabId="2">
|
<TabPane tabId="1">
|
||||||
<ContractFunctionsContainer contract={this.props.contract} />
|
<ContractOverview contract={this.props.contract} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tabId="3">
|
<TabPane tabId="2">
|
||||||
<ContractLoggerContainer contract={this.props.contract} />
|
<ContractFunctionsContainer contract={this.props.contract} />
|
||||||
</TabPane>
|
</TabPane>
|
||||||
</TabContent>
|
<TabPane tabId="3">
|
||||||
|
<ContractLoggerContainer contract={this.props.contract} />
|
||||||
|
</TabPane>
|
||||||
|
</TabContent>
|
||||||
|
</CardBody>
|
||||||
|
</Card>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ const Contract = ({contract}) => {
|
|||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<h1>{contract.className} Overview</h1>
|
|
||||||
<Table
|
<Table
|
||||||
responsive
|
responsive
|
||||||
className="text-nowrap"
|
className="text-nowrap"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user