mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 18:19:55 +00:00
Dessalines
b830c0f60e
- Use ISO-630 library for native language names - Add sr-only to svg tooltips. Fixes #218 - Change support link and icon.
33 lines
684 B
TypeScript
33 lines
684 B
TypeScript
import { Component } from "inferno";
|
|
|
|
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}`}>
|
|
<div class="sr-only">
|
|
<title>{this.props.icon}</title>
|
|
</div>
|
|
<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" />;
|
|
}
|
|
}
|