lemmy/ui/src/components/cake-day.tsx

26 lines
576 B
TypeScript
Raw Normal View History

import { Component } from 'inferno';
import { i18n } from '../i18next';
interface CakeDayProps {
2020-07-09 23:59:02 +00:00
creatorName: string;
}
export class CakeDay extends Component<CakeDayProps, any> {
render() {
return (
2020-07-08 17:46:18 +00:00
<div
2020-07-09 23:59:02 +00:00
className={`mx-2 d-inline-block unselectable pointer`}
data-tippy-content={this.cakeDayTippy()}
2020-07-08 17:46:18 +00:00
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-cake"></use>
</svg>
</div>
);
}
2020-07-09 23:59:02 +00:00
cakeDayTippy(): string {
return i18n.t('cake_day_info', { creator_name: this.props.creatorName });
}
}