@@ -44,9 +44,9 @@ export const colViews: ColView[] = [
4444
4545interface ColumnConfigProps {
4646 handleShowDetails : ( design : Pattern ) => void ;
47- handleCloneClick : ( design : Pattern ) => void ;
48- handleCopyUrl : ( design : Pattern ) => void ;
49- handleOpenPlayground : ( design : Pattern ) => void ;
47+ handleClone : ( designId : string , name : string ) => void ;
48+ handleCopyUrl : ( designId : string , name : string ) => void ;
49+ handleOpenPlayground : ( designId : string , name : string ) => void ;
5050 handleUnpublish ?: ( design : Pattern ) => void ;
5151 maxWidth ?: boolean ;
5252 getCatalogUrl : ( type : string , name : string ) => string ;
@@ -69,7 +69,7 @@ interface ActionItem {
6969
7070export const createDesignColumns = ( {
7171 handleShowDetails,
72- handleCloneClick ,
72+ handleClone ,
7373 handleCopyUrl,
7474 handleOpenPlayground,
7575 handleUnpublish = ( ) => { } ,
@@ -292,7 +292,7 @@ export const createDesignColumns = ({
292292 const baseActions : ActionItem [ ] = [
293293 {
294294 title : 'Clone' ,
295- onClick : ( ) => handleCloneClick ( rowData ) ,
295+ onClick : ( ) => handleClone ( rowData . id , rowData . name ) ,
296296 disabled : isCloneDisabled ,
297297 icon : < CopyIcon width = { 24 } height = { 24 } fill = { theme . palette . text . primary } />
298298 } ,
@@ -307,7 +307,7 @@ export const createDesignColumns = ({
307307 } ,
308308 {
309309 title : 'Copy Link' ,
310- onClick : ( ) => handleCopyUrl ( rowData ) ,
310+ onClick : ( ) => handleCopyUrl ( rowData . id , rowData . name ) ,
311311 icon : < ChainIcon width = { '24' } height = { '24' } fill = { theme . palette . text . primary } />
312312 } ,
313313 {
@@ -345,11 +345,11 @@ export const createDesignColumns = ({
345345 } ,
346346 {
347347 title : 'Open in playground' ,
348- onClick : ( ) => handleOpenPlayground ( rowData ) ,
348+ onClick : ( ) => handleOpenPlayground ( rowData . id , rowData . name ) ,
349349 icon : < KanvasIcon width = { 24 } height = { 24 } primaryFill = { theme . palette . text . primary } />
350350 }
351351 ] ;
352- // TODO: make this unbpublish action work for playgroud
352+
353353 const actionsList = showUnpublish
354354 ? [
355355 ...baseActions . slice ( 0 , 2 ) ,
0 commit comments