all files / components/ ExampleComponent.react.js

100% Statements 46/46
100% Branches 33/33
100% Functions 10/10
100% Lines 6/6
4 statements, 14 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                          
import React, {Component} from 'react';
import PropTypes from 'prop-types';
 
/**
 * ExampleComponent is an example component.
 * It takes a single property, `label`, and
 * displays it.
 */
export default class ExampleComponent extends Component {
    render() {
        const {label} = this.props;
 
        return (
            <div>ExampleComponent: {label}</div>
        );
    }
}
 
ExampleComponent.propTypes = {
    /**
     * A label that will be printed when this component is rendered.
     */
    label: PropTypes.string.isRequired
};