@@ -18,41 +18,61 @@ export const ExportButton = ({
1818 reactToPrintFn,
1919 data,
2020 handleExport,
21+ buttonAlign,
2122} : {
23+ buttonAlign : 'left' | 'right' | 'center' ;
2224 clusterInfo : SyntheticDataInfo | undefined ;
2325 reactToPrintFn : UseReactToPrintFn ;
2426 data : SyntheticData ;
2527 handleExport : ( syntheticData : object [ ] ) => void ;
2628} ) => {
2729 const { t } = useTranslation ( ) ;
30+ const buttonAlignClass =
31+ buttonAlign === 'left'
32+ ? 'mr-auto'
33+ : buttonAlign === 'right'
34+ ? 'ml-auto'
35+ : 'mx-auto' ;
2836 return (
2937 < div className = "flex flex-row gap-2 hideonprint" >
3038 < DropdownMenu >
3139 < DropdownMenuTrigger asChild >
3240 < Button
3341 variant = "default"
3442 size = "sm"
35- className = "mx-auto py-6 px-4 text-sm bg-aaRegularLight hover:bg-aaRegularLight text-black hover:text-black transform transition-colors duration-200 group"
43+ className = { `${ buttonAlignClass } py-6 px-4 text-sm
44+ bg-aaRegularLight hover:bg-aaRegularLight
45+ text-black hover:text-black
46+ transform transition-colors duration-200 group
47+ relative
48+ before:absolute before:inset-0
49+ before:p-[3px] before:rounded-md
50+ before:bg-gradient-to-br before:from-[#60a5fa] before:to-[#c5d8eb]
51+ before:-z-10
52+ after:absolute after:inset-[2px]
53+ after:rounded-[4px]
54+ after:bg-aaRegularLight
55+ after:-z-10` }
3656 >
3757 { t ( 'downloadButton' ) }
3858 < ChevronDown className = "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180" />
3959 </ Button >
4060 </ DropdownMenuTrigger >
4161 < DropdownMenuContent
4262 align = "end"
43- className = "bg-white p-4 rounded-md flex flex-col gap-2 shadow-md"
63+ className = "bg-white rounded-md flex flex-col gap-0 shadow-md"
4464 >
4565 < DropdownMenuItem
4666 onClick = { ( ) => reactToPrintFn ( ) }
47- className = "flex flex-row items-center cursor-pointer"
67+ className = "px-4 py-2 flex flex-row items-center cursor-pointer hover:bg-slate-100 rounded-md transition-colors duration-200 "
4868 >
4969 < Share className = "size-3.5 mr-2" />
5070 { t ( 'syntheticData.exportToPDF' ) }
5171 </ DropdownMenuItem >
5272 { clusterInfo && (
5373 < >
5474 < DropdownMenuItem
55- className = "flex flex-row items-center cursor-pointer"
75+ className = "px-4 py-2 flex flex-row items-center cursor-pointer hover:bg-slate-100 rounded-md transition-colors duration-200 "
5676 onClick = { ( ) => {
5777 downloadFile (
5878 JSON . stringify (
@@ -72,7 +92,7 @@ export const ExportButton = ({
7292 { t ( 'syntheticData.exportToJSON' ) }
7393 </ DropdownMenuItem >
7494 < DropdownMenuItem
75- className = "flex flex-row items-center cursor-pointer"
95+ className = "px-4 py-2 flex flex-row items-center cursor-pointer hover:bg-slate-100 rounded-md transition-colors duration-200 "
7696 onClick = { ( ) => {
7797 handleExport (
7898 clusterInfo . syntheticData as object [ ]
0 commit comments