1 import classNames from "classnames";
2 import { Component } from "inferno";
3 import { i18n } from "../../i18next";
12 export class Icon extends Component<IconProps, any> {
13 constructor(props: any, context: any) {
14 super(props, context);
20 className={classNames("icon", this.props.classes, {
21 "icon-inline": this.props.inline,
22 small: this.props.small,
25 <use xlinkHref={`#icon-${this.props.icon}`}></use>
26 <div className="sr-only">
27 <title>{this.props.icon}</title>
34 interface SpinnerProps {
38 export class Spinner extends Component<SpinnerProps, any> {
39 constructor(props: any, context: any) {
40 super(props, context);
47 classes={`spin ${this.props.large && "spinner-large"}`}
53 export class PurgeWarning extends Component<any, any> {
54 constructor(props: any, context: any) {
55 super(props, context);
60 <div className="mt-2 alert alert-danger" role="alert">
61 <Icon icon="alert-triangle" classes="icon-inline mr-2" />
62 {i18n.t("purge_warning")}