@@ -17,6 +17,7 @@ interface ActionButtonsProps {
17
17
handleUnpublish : ( ) => void ;
18
18
isCloneDisabled : boolean ;
19
19
showUnpublishAction : boolean ;
20
+ showOpenPlaygroundAction : boolean ;
20
21
onOpenPlaygroundClick : ( designId : string , name : string ) => void ;
21
22
}
22
23
@@ -29,6 +30,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
29
30
isCloneDisabled,
30
31
showUnpublishAction,
31
32
handleUnpublish,
33
+ showOpenPlaygroundAction,
32
34
onOpenPlaygroundClick
33
35
} ) => {
34
36
const cleanedType = type . replace ( 'my-' , '' ) . replace ( / s $ / , '' ) ;
@@ -84,26 +86,27 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
84
86
) }
85
87
</ div >
86
88
) }
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
+ ) }
107
110
108
111
{ showUnpublishAction && (
109
112
< UnpublishAction
0 commit comments