ES6 Plato on Github
Report Home
Summary Display
components/UserMessages/UserMessage.js
Maintainability
92.20
Lines of code
27
Difficulty
6.90
Estimated Errors
0.08
Function weight
By Complexity
By SLOC
import React from 'react'; import { Alert } from 'react-bootstrap'; export class ErrorUserMessage extends React.Component { render() { return <Alert bsStyle="danger" onDismiss={this.handleDismiss}> <h4>Oh snap! You got an error!</h4> <p class="text-danger">{this.props.text}</p> </Alert>; } }; export class SuccessUserMessage extends React.Component { render() { return ( <Alert bsStyle="success" onDismiss={this.handleDismiss}> <p class="text-success">{this.props.text}</p> </Alert> ); } };