@@ -17,6 +17,7 @@ interface ActionButtonsProps {
1717 handleUnpublish : ( ) => void ;
1818 isCloneDisabled : boolean ;
1919 showUnpublishAction : boolean ;
20+ showOpenPlaygroundAction : boolean ;
2021 onOpenPlaygroundClick : ( designId : string , name : string ) => void ;
2122}
2223
@@ -29,6 +30,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
2930 isCloneDisabled,
3031 showUnpublishAction,
3132 handleUnpublish,
33+ showOpenPlaygroundAction,
3234 onOpenPlaygroundClick
3335} ) => {
3436 const cleanedType = type . replace ( 'my-' , '' ) . replace ( / s $ / , '' ) ;
@@ -84,26 +86,27 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
8486 ) }
8587 </ div >
8688 ) }
87-
88- < ActionButton
89- sx = { {
90- borderRadius : '0.2rem' ,
91- backgroundColor : 'transparent' ,
92- border : `1px solid ${ theme . palette . border . normal } ` ,
93- color : theme . palette . text . default ,
94- gap : '10px' ,
95- width : '100%'
96- } }
97- onClick = { ( ) => onOpenPlaygroundClick ( details . id , details . name ) }
98- >
99- < KanvasIcon
100- width = { 24 }
101- height = { 24 }
102- primaryFill = { theme . palette . icon . default }
103- fill = { theme . palette . icon . default }
104- />
105- Open in Playground
106- </ ActionButton >
89+ { showOpenPlaygroundAction && (
90+ < ActionButton
91+ sx = { {
92+ borderRadius : '0.2rem' ,
93+ backgroundColor : 'transparent' ,
94+ border : `1px solid ${ theme . palette . border . normal } ` ,
95+ color : theme . palette . text . default ,
96+ gap : '10px' ,
97+ width : '100%'
98+ } }
99+ onClick = { ( ) => onOpenPlaygroundClick ( details . id , details . name ) }
100+ >
101+ < KanvasIcon
102+ width = { 24 }
103+ height = { 24 }
104+ primaryFill = { theme . palette . icon . default }
105+ fill = { theme . palette . icon . default }
106+ />
107+ Open in Playground
108+ </ ActionButton >
109+ ) }
107110
108111 { showUnpublishAction && (
109112 < UnpublishAction
0 commit comments