2021-02-22 02:39:04 +00:00
|
|
|
import { Component } from "inferno";
|
2021-02-11 20:35:27 +00:00
|
|
|
|
|
|
|
interface IconProps {
|
|
|
|
icon: string;
|
|
|
|
classes?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Icon extends Component<IconProps, any> {
|
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<svg class={`icon ${this.props.classes}`}>
|
2021-03-25 15:20:54 +00:00
|
|
|
<div class="sr-only">
|
|
|
|
<title>{this.props.icon}</title>
|
|
|
|
</div>
|
2021-02-11 20:35:27 +00:00
|
|
|
<use xlinkHref={`#icon-${this.props.icon}`}></use>
|
|
|
|
</svg>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Spinner extends Component<any, any> {
|
|
|
|
constructor(props: any, context: any) {
|
|
|
|
super(props, context);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return <Icon icon="spinner" classes="icon-spinner spin" />;
|
|
|
|
}
|
|
|
|
}
|