umami/src/app/(main)/websites/[websiteId]/cohorts/CohortAddButton.tsx
Francis Cao a6d4519a98
Some checks failed
Create docker images (cloud) / Build, push, and deploy (push) Has been cancelled
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled
set maxHeight for DialogButton. remove from individual buttons
2025-11-04 09:34:37 -08:00

21 lines
610 B
TypeScript

import { useMessages } from '@/components/hooks';
import { Plus } from '@/components/icons';
import { DialogButton } from '@/components/input/DialogButton';
import { CohortEditForm } from './CohortEditForm';
export function CohortAddButton({ websiteId }: { websiteId: string }) {
const { formatMessage, labels } = useMessages();
return (
<DialogButton
icon={<Plus />}
label={formatMessage(labels.cohort)}
variant="primary"
width="800px"
>
{({ close }) => {
return <CohortEditForm websiteId={websiteId} onClose={close} />;
}}
</DialogButton>
);
}