Sha256: ccb9b30567b3c70c15dda005ac7cd557c08738848806a15883e6a019f9b7012f

Contents?: true

Size: 1014 Bytes

Versions: 5

Compression:

Stored size: 1014 Bytes

Contents

import React from 'react';

export class ErrorDisplay extends React.Component {
    static propTypes =
        {model:  Hippo.PropTypes.State.isRequired};
    bindEvents() {
        return (
            {model: "change:error"}
        );
    }

    clearErrors() {
        return (
            this.model.errors = null
        );
    }

    render() {
        if (!this.model.errors) { return null; }
        return (
            <div export className="alert alert-warning alert-dismissible" role="alert">
                <button
                    onClick={this.clearErrors}
                    type="button"
                    export className="close"
                    data-dismiss="alert"
                    aria-label="Close">
                    <span aria-hidden="true">
                        ×
                    </span>
                </button>
                <i export className="icon icon-exclamation-circle" />
                {this.model.errorMessage}
            </div>
        );
    }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hippo-fw-0.9.5 client/hippo/components/shared/ErrorDisplay.jsx
hippo-fw-0.9.4 client/hippo/components/shared/ErrorDisplay.jsx
hippo-fw-0.9.3 client/hippo/components/shared/ErrorDisplay.jsx
hippo-fw-0.9.2 client/hippo/components/shared/ErrorDisplay.jsx
hippo-fw-0.9.1 client/hippo/components/shared/ErrorDisplay.jsx