ES6 Plato on Github
Report Home
Summary Display
components/Logbook/Tag/TagListMenu.js
Maintainability
81.03
Lines of code
37
Difficulty
9.33
Estimated Errors
0.14
Function weight
By Complexity
By SLOC
import React from 'react'; import PropTypes from 'prop-types'; import { ButtonToolbar, Grid, Row, Col } from 'react-bootstrap'; import EventListMenuButton from '../Menu/EventListMenuButton'; /** * The menu displayed above the tag list */ class TagListMenu extends React.Component { render() { return ( <Grid fluid={true} style={{ marginTop: '10px' }}> <Row> <Col xs={2}> <ButtonToolbar> {this.props.logbookContext.isReleased === false ? <div onClick={this.props.onNewTagButtonClicked}> <EventListMenuButton text='New' tooltipText='Create a new tag' glyph='plus' isEnabled={true} /> </div> : null} </ButtonToolbar> </Col> </Row> </Grid > ); } } TagListMenu.propTypes = { /** Callback function used to display new tag form */ onNewTagClicked: PropTypes.func }; export default TagListMenu;