File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interface ActionButtonsProps {
1717 isCloneLoading : boolean ;
1818 handleClone : ( name : string , id : string ) => void ;
1919 mode : string ;
20- handleUnpublish ? : ( ) => void ;
20+ handleUnpublish : ( ) => void ;
2121 isCloneDisabled : boolean ;
2222 showOpenPlaygroundButton : boolean ;
2323 showUnpublishAction : boolean ;
@@ -117,23 +117,17 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
117117 </ LinkUrl >
118118 ) }
119119 { showUnpublishAction && (
120- < LinkUrl
121- style = { { width : '100%' } }
120+ < UnpublishAction
121+ sx = { {
122+ borderRadius : '0.2rem' ,
123+ gap : '10px' ,
124+ width : '100%'
125+ } }
122126 onClick = { handleUnpublish }
123- target = "_blank"
124- rel = "noreferrer"
125127 >
126- < UnpublishAction
127- sx = { {
128- borderRadius : '0.2rem' ,
129- gap : '10px' ,
130- width : '100%'
131- } }
132- >
133- < PublishIcon width = { 24 } height = { 24 } fill = { charcoal [ 10 ] } />
134- Unpublish
135- </ UnpublishAction >
136- </ LinkUrl >
128+ < PublishIcon width = { 24 } height = { 24 } fill = { charcoal [ 10 ] } />
129+ Unpublish
130+ </ UnpublishAction >
137131 ) }
138132 </ StyledActionWrapper >
139133 ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ interface LeftPanelProps {
2222 technologySVGSubpath : string ;
2323 fontFamily ?: string ;
2424 showOpenPlaygroundButton ?: boolean ;
25+ handleUnpublish : ( ) => void ;
26+ showUnpublishAction ?: boolean ;
2527}
2628
2729const LeftPanel : React . FC < LeftPanelProps > = ( {
@@ -31,13 +33,15 @@ const LeftPanel: React.FC<LeftPanelProps> = ({
3133 actionItems = true ,
3234 isCloneLoading,
3335 handleClone,
36+ handleUnpublish,
3437 showTechnologies = true ,
3538 mode,
3639 filteredAcademyData,
3740 isCloneDisabled,
3841 technologySVGPath,
3942 technologySVGSubpath,
4043 fontFamily,
44+ showUnpublishAction = false ,
4145 showOpenPlaygroundButton = true
4246} ) => {
4347 const theme = useTheme ( ) ;
@@ -77,6 +81,8 @@ const LeftPanel: React.FC<LeftPanelProps> = ({
7781 cardId = { cardId }
7882 isCloneLoading = { isCloneLoading }
7983 handleClone = { handleClone }
84+ showUnpublishAction = { showUnpublishAction }
85+ handleUnpublish = { handleUnpublish }
8086 mode = { mode }
8187 isCloneDisabled = { isCloneDisabled }
8288 showOpenPlaygroundButton = { showOpenPlaygroundButton }
You can’t perform that action at this time.
0 commit comments