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

doc
Kai Reinhard
15.35.2021 8d461f55bab3c2ea0ec55d2bc2d0005e97430657
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;