1 import { getStaticDir } from "@utils/env";
2 import classNames from "classnames";
3 import { Component } from "inferno";
4 import { I18NextService } from "../../services";
13 export class Icon extends Component<IconProps, any> {
14 constructor(props: any, context: any) {
15 super(props, context);
21 className={classNames("icon", this.props.classes, {
22 "icon-inline": this.props.inline,
23 small: this.props.small,
27 xlinkHref={`${getStaticDir()}/assets/symbols.svg#icon-${
31 <div className="visually-hidden">
32 <title>{this.props.icon}</title>
39 interface SpinnerProps {
44 export class Spinner extends Component<SpinnerProps, any> {
45 constructor(props: any, context: any) {
46 super(props, context);
53 classes={classNames("spin", this.props.className, {
54 "spinner-large": this.props.large,
61 export class PurgeWarning extends Component<any, any> {
62 constructor(props: any, context: any) {
63 super(props, context);
68 <div className="purge-warning mt-2 alert alert-danger" role="alert">
69 <Icon icon="alert-triangle" classes="icon-inline me-2" />
70 {I18NextService.i18n.t("purge_warning")}