mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
19 lines
566 B
TypeScript
19 lines
566 B
TypeScript
import { useMessages } from '@/components/hooks';
|
|
import { Plus } from '@/components/icons';
|
|
import { DialogButton } from '@/components/input/DialogButton';
|
|
import { LinkEditForm } from './LinkEditForm';
|
|
|
|
export function LinkAddButton({ teamId }: { teamId?: string }) {
|
|
const { formatMessage, labels } = useMessages();
|
|
|
|
return (
|
|
<DialogButton
|
|
icon={<Plus />}
|
|
label={formatMessage(labels.addLink)}
|
|
variant="primary"
|
|
width="600px"
|
|
>
|
|
{({ close }) => <LinkEditForm teamId={teamId} onClose={close} />}
|
|
</DialogButton>
|
|
);
|
|
}
|