Skip to content

Commit

Permalink
fixed the issue in width of catalog button
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-dkrz committed Feb 6, 2025
1 parent 02b9057 commit d71a691
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions assets/js/Containers/Databrowser/CatalogExportDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,41 +55,40 @@ const CatalogExportDropdown = ({
}) => {
const isDisabled = disabled || numFiles > maxFiles;

if (isDisabled) {
return (
return (
<Dropdown className={className}>
<OverlayTrigger
overlay={
<Tooltip>
Please narrow down your search to a maximum of 100,000 results to
enable catalog exports
</Tooltip>
isDisabled ? (
<Tooltip>
Please narrow down your search to a maximum of 100,000 results to
enable catalog exports
</Tooltip>
) : (
<></>
)
}
>
<span>
<CustomToggle disabled className={className}>
<Dropdown.Toggle as={CustomToggle} disabled={isDisabled}>
Export Catalog
</CustomToggle>
</Dropdown.Toggle>
</span>
</OverlayTrigger>
);
}

return (
<Dropdown className={className}>
<Dropdown.Toggle as={CustomToggle}>Export Catalog</Dropdown.Toggle>

<Dropdown.Menu style={{ minWidth: "200px" }}>
<Dropdown.Item
href={createCatalogLink("intake")}
target="_blank"
rel="noopener noreferrer"
>
<DropdownItemContent icon={IntakeIcon}>
Intake Catalog
</DropdownItemContent>
</Dropdown.Item>
{!isDisabled && (
<Dropdown.Menu style={{ minWidth: "200px" }}>
<Dropdown.Item
href={createCatalogLink("intake")}
target="_blank"
rel="noopener noreferrer"
>
<DropdownItemContent icon={IntakeIcon}>
Intake Catalog
</DropdownItemContent>
</Dropdown.Item>

<Dropdown.Divider />
<Dropdown.Divider />
<Dropdown.Header className="fw-bold">STAC Catalog</Dropdown.Header>

<Dropdown.Item
Expand All @@ -111,7 +110,8 @@ const CatalogExportDropdown = ({
Dynamic STAC
</DropdownItemContent>
</Dropdown.Item>
</Dropdown.Menu>
</Dropdown.Menu>
)}
</Dropdown>
);
};
Expand Down

0 comments on commit d71a691

Please sign in to comment.