mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
24 lines
648 B
TypeScript
24 lines
648 B
TypeScript
import { Button, Icon, Icons, TooltipPopup } from 'react-basics';
|
|
import Link from 'next/link';
|
|
import { useMessages } from 'components/hooks';
|
|
|
|
export function LogoutButton({
|
|
tooltipPosition = 'top',
|
|
}: {
|
|
tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
}) {
|
|
const { formatMessage, labels } = useMessages();
|
|
return (
|
|
<Link href="/src/app/logout/LogoutPage">
|
|
<TooltipPopup label={formatMessage(labels.logout)} position={tooltipPosition}>
|
|
<Button variant="quiet">
|
|
<Icon>
|
|
<Icons.Logout />
|
|
</Icon>
|
|
</Button>
|
|
</TooltipPopup>
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
export default LogoutButton;
|