diff --git a/src/custom/CatalogDetail/ActionButton.tsx b/src/custom/CatalogDetail/ActionButton.tsx index 41154b03..5e9b6350 100644 --- a/src/custom/CatalogDetail/ActionButton.tsx +++ b/src/custom/CatalogDetail/ActionButton.tsx @@ -17,6 +17,7 @@ interface ActionButtonsProps { handleUnpublish: () => void; isCloneDisabled: boolean; showUnpublishAction: boolean; + showOpenPlaygroundAction: boolean; onOpenPlaygroundClick: (designId: string, name: string) => void; } @@ -29,6 +30,7 @@ const ActionButtons: React.FC = ({ isCloneDisabled, showUnpublishAction, handleUnpublish, + showOpenPlaygroundAction, onOpenPlaygroundClick }) => { const cleanedType = type.replace('my-', '').replace(/s$/, ''); @@ -84,26 +86,27 @@ const ActionButtons: React.FC = ({ )} )} - - onOpenPlaygroundClick(details.id, details.name)} - > - - Open in Playground - + {showOpenPlaygroundAction && ( + onOpenPlaygroundClick(details.id, details.name)} + > + + Open in Playground + + )} {showUnpublishAction && ( void; showUnpublishAction?: boolean; + showOpenPlaygroundAction?: boolean; onOpenPlaygroundClick: (designId: string, name: string) => void; } @@ -38,6 +39,7 @@ const LeftPanel: React.FC = ({ technologySVGSubpath, fontFamily, showUnpublishAction = false, + showOpenPlaygroundAction = true, onOpenPlaygroundClick }) => { const theme = useTheme(); @@ -79,6 +81,7 @@ const LeftPanel: React.FC = ({ showUnpublishAction={showUnpublishAction} handleUnpublish={handleUnpublish} isCloneDisabled={isCloneDisabled} + showOpenPlaygroundAction={showOpenPlaygroundAction} onOpenPlaygroundClick={onOpenPlaygroundClick} /> {showTechnologies && ( diff --git a/src/custom/CustomTooltip/customTooltip.tsx b/src/custom/CustomTooltip/customTooltip.tsx index b18cb18e..7287c152 100644 --- a/src/custom/CustomTooltip/customTooltip.tsx +++ b/src/custom/CustomTooltip/customTooltip.tsx @@ -57,7 +57,7 @@ function CustomTooltip({ onClick={onClick} {...props} > - {children} + {children} ); }