mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
10.33.2019 abb1be365c62fe69ea36d199141bcf360992e196
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import React from 'react';
import {Alert} from 'reactstrap';
import {FormButton} from "./forms/FormComponents";
import I18n from "./translation/I18n";
 
const ErrorAlert = (props) => <Alert
    color={'danger'}
>
    <h4>{props.titleKey ? <I18n name={props.titleKey}/> : props.title}</h4>
    <p>{props.descriptionKey ? <I18n name={props.descriptionKey}/> :props.description}</p>
    {props.action ? <p>
        <FormButton bsStyle={props.action.style}
            onClick={props.action.handleClick}
        >
            {props.action.titleKey ? <I18n name={props.action.titleKey}/> : props.action.title}
        </FormButton>
    </p> : undefined}
</Alert>;
 
export default ErrorAlert;