# src/components/Event/Tag/TagActionBar.js

## Maintainability

83.89

## Lines of code

67

## Difficulty

11.14

## Estimated Errors

0.16

## 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() { const { } = this.props; 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 // /** the identifier of the current investigation */ // investigationId: PropTypes.string, // /** True when the user is writing a new event */ // isNewEventVisible: PropTypes.bool, // /** the number of events found */ // numberOfMatchingEventsFound: PropTypes.number, // /** callback function which reverse the sorting of events by date */ // reverseEventsSortingByCreationDate: PropTypes.func.isRequired, // /** Callback function which reloads the events based on search criteria*/ // searchEvents: PropTypes.func, // /* the sessionId*/ // sessionId: PropTypes.string.isRequired, // /** Callback function triggered when the user clicks on the new event button */ // setNewEventVisibility: PropTypes.func, // /** the callback function executed when the user clicks the view buttons */ // setView: PropTypes.func, // /** the filter used to sort event */ // sortingFilter: PropTypes.object.isRequired } export default TagActionBar;