mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Typescript refactor.
This commit is contained in:
parent
b578162cb6
commit
7c42f0da82
173 changed files with 968 additions and 549 deletions
24
src/components/input/LogoutButton.tsx
Normal file
24
src/components/input/LogoutButton.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Button, Icon, Icons, TooltipPopup } from 'react-basics';
|
||||
import Link from 'next/link';
|
||||
import useMessages from 'components/hooks/useMessages';
|
||||
|
||||
export function LogoutButton({
|
||||
tooltipPosition = 'top',
|
||||
}: {
|
||||
tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
|
||||
}) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
return (
|
||||
<Link href="/src/app/logout/logout">
|
||||
<TooltipPopup label={formatMessage(labels.logout)} position={tooltipPosition}>
|
||||
<Button variant="quiet">
|
||||
<Icon>
|
||||
<Icons.Logout />
|
||||
</Icon>
|
||||
</Button>
|
||||
</TooltipPopup>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
export default LogoutButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue