Skip to content

Commit

Permalink
Merge pull request #804 from sudhanshutech/action/theme
Browse files Browse the repository at this point in the history
fix theme for action buttons
  • Loading branch information
sudhanshutech authored Nov 11, 2024
2 parents d4ce153 + 7c5b1f1 commit 585d863
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/custom/CatalogDetail/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { CircularProgress } from '../../base';
import { CopyIcon, KanvasIcon, PublishIcon } from '../../icons';
import Download from '../../icons/Download/Download';
import { charcoal } from '../../theme';
import { charcoal, useTheme } from '../../theme';
import { Pattern } from '../CustomCatalog/CustomCard';
import { downloadFilter, downloadYaml } from './helper';
import { ActionButton, StyledActionWrapper, UnpublishAction } from './style';
Expand Down Expand Up @@ -32,6 +32,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
onOpenPlaygroundClick
}) => {
const cleanedType = type.replace('my-', '').replace(/s$/, '');
const theme = useTheme();
return (
<StyledActionWrapper>
{actionItems && (
Expand All @@ -46,7 +47,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
<ActionButton
sx={{
borderRadius: '0.2rem',
backgroundColor: charcoal[10],
backgroundColor: theme.palette.background.brand?.default,
gap: '10px',
color: charcoal[100]
}}
Expand All @@ -65,7 +66,8 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
sx={{
borderRadius: '0.2rem',
gap: '10px',
color: charcoal[100]
color: charcoal[100],
backgroundColor: theme.palette.background.cta?.default
}}
onClick={() => handleClone(details?.name, details?.id)}
disabled={isCloneDisabled}
Expand All @@ -86,14 +88,20 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
<ActionButton
sx={{
borderRadius: '0.2rem',
backgroundColor: 'background.cta.default',
color: charcoal[10],
backgroundColor: 'transparent',
border: `1px solid ${theme.palette.border.normal}`,
color: theme.palette.text.default,
gap: '10px',
width: '100%'
}}
onClick={() => onOpenPlaygroundClick(details.id, details.name)}
>
<KanvasIcon width={24} height={24} primaryFill={charcoal[10]} fill={charcoal[10]} />
<KanvasIcon
width={24}
height={24}
primaryFill={theme.palette.icon.default}
fill={theme.palette.icon.default}
/>
Open in Playground
</ActionButton>

Expand Down

0 comments on commit 585d863

Please sign in to comment.