From 326bfbc72c6740062d29d71aab0e7ef0cd9b8229 Mon Sep 17 00:00:00 2001 From: jpaten Date: Mon, 14 Oct 2024 18:20:17 -0700 Subject: [PATCH] chore: added optional id to ExportMethod buttons (#217) --- .../components/ExportMethod/exportMethod.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/Export/components/ExportMethod/exportMethod.tsx b/src/components/Export/components/ExportMethod/exportMethod.tsx index 33988675..c8c2b652 100644 --- a/src/components/Export/components/ExportMethod/exportMethod.tsx +++ b/src/components/Export/components/ExportMethod/exportMethod.tsx @@ -10,7 +10,6 @@ import { SectionContent, } from "../../../common/Section/section.styles"; import { ExportButton, SectionFootnote } from "./exportMethod.styles"; - export interface ExportMethodProps { buttonLabel: string; description: ReactNode; @@ -18,6 +17,7 @@ export interface ExportMethodProps { isAccessible?: boolean; route: string; title: string; + trackingId?: string; } export const ExportMethod = ({ @@ -27,6 +27,7 @@ export const ExportMethod = ({ isAccessible = true, route, title, + trackingId, }: ExportMethodProps): JSX.Element => { const { disabled, message } = useDownloadStatus(); return ( @@ -40,9 +41,18 @@ export const ExportMethod = ({ - - {buttonLabel} - + {trackingId ? ( + + {buttonLabel} + + ) : ( + + {buttonLabel} + + )}