Skip to content

Commit

Permalink
Merge pull request #891 from amitamrutiya/clone-
Browse files Browse the repository at this point in the history
feat: make clone button as a primary action
  • Loading branch information
amitamrutiya authored Jan 17, 2025
2 parents 17cdac4 + addcce5 commit 0320125
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions src/custom/CatalogDetail/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,13 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
width: '100%'
}}
>
<ActionButton
sx={{
borderRadius: '0.2rem',
backgroundColor: 'transparent',
border: `1px solid ${theme.palette.border.normal}`,
gap: '10px',
color: theme.palette.text.default
}}
onClick={() =>
cleanedType === VIEWS
? downloadYaml(details.pattern_file, details.name)
: downloadPattern(details.id, details.name, getDownloadUrl)
}
>
<Download width={24} height={24} fill={theme.palette.icon.default} />
Download
</ActionButton>

{cleanedType !== FILTERS && (
<ActionButton
sx={{
backgroundColor: showOpenPlaygroundAction ? 'transparent' : undefined,
color: theme.palette.text.default,
borderRadius: '0.2rem',
gap: '10px',
color: theme.palette.text.default,
backgroundColor: 'transparent',
border: `1px solid ${theme.palette.border.normal}`
}}
onClick={() => handleClone(details?.name, details?.id)}
Expand All @@ -116,6 +98,23 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
)}
</ActionButton>
)}
<ActionButton
sx={{
borderRadius: '0.2rem',
backgroundColor: 'transparent',
border: `1px solid ${theme.palette.border.normal}`,
gap: '10px',
color: theme.palette.text.default
}}
onClick={() =>
cleanedType === VIEWS
? downloadYaml(details.pattern_file, details.name)
: downloadPattern(details.id, details.name, getDownloadUrl)
}
>
<Download width={24} height={24} fill={theme.palette.icon.default} />
Download
</ActionButton>
</div>
)}

Expand Down

0 comments on commit 0320125

Please sign in to comment.