ES6 Plato on Github
Report Home
Summary Display
components/Event/Tag/TagActionBar.js
Maintainability
86.31
Lines of code
44
Difficulty
9.87
Estimated Errors
0.15
Function weight
By Complexity
By SLOC
import React from 'react'; import PropTypes from 'prop-types'; import { ButtonToolbar, Grid, Row, Col } from 'react-bootstrap'; import NewButton from '../NewButton'; /** * The menu displayed above the tag list */ class TagActionBar extends React.Component { constructor(props) { super(props); this.showTagEditor = this.showTagEditor.bind(this); } render() { return ( <Grid fluid={true} style={{ marginTop: '10px' }}> <Row> <Col xs={2}> <ButtonToolbar> <NewButton isNewComponentVisible={false} onClick={this.showTagEditor} /> </ButtonToolbar> </Col> </Row> </Grid > ); } /** Callback triggered when the user click to create a new tag */ showTagEditor() { this.props.showNewTag(); } } TagActionBar.propTypes = { /** Callback function used to display new tag form */ showNewTag: PropTypes.func }; export default TagActionBar;