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,
26 xlinkHref={`/static/assets/symbols.svg#icon-${this.props.icon}`}
28 <div className="visually-hidden">
29 <title>{this.props.icon}</title>
36 interface SpinnerProps {
40 export class Spinner extends Component<SpinnerProps, any> {
41 constructor(props: any, context: any) {
42 super(props, context);
49 classes={`spin ${this.props.large && "spinner-large"}`}
55 export class PurgeWarning extends Component<any, any> {
56 constructor(props: any, context: any) {
57 super(props, context);
62 <div className="purge-warning mt-2 alert alert-danger" role="alert">
63 <Icon icon="alert-triangle" classes="icon-inline me-2" />
64 {i18n.t("purge_warning")}