File tree Expand file tree Collapse file tree 2 files changed +14
-18
lines changed
Expand file tree Collapse file tree 2 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,6 @@ function AppearanceBuilder({ onRefresh }: Props) {
4848 }
4949 } }
5050 onRefresh = { onRefresh }
51- onDone = { ( ) => {
52- uiActions . setAppearanceComplete ( true )
53- toolActions . setBuildCompleteStep ( 'filled' )
54- } }
5551 initialIsOpen
5652 >
5753 < InputFieldset label = "Text" icon = { < SVGText className = "w-5 h-5" /> } >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { GhostButton } from './GhostButton'
88interface BuilderAccordionProps {
99 title : string
1010 onRefresh : ( ) => void
11- onDone : ( ) => void
11+ onDone ? : ( ) => void
1212 isComplete ?: boolean
1313 initialIsOpen ?: boolean
1414 onToggle ?: ( isOpen : boolean ) => void
@@ -32,11 +32,6 @@ export const BuilderAccordion: React.FC<BuilderAccordionProps> = ({
3232 onToggle ?.( isOpen )
3333 }
3434
35- const handleDoneClick = ( ) => {
36- setIsOpen ( false )
37- onDone ( )
38- }
39-
4035 return (
4136 < details
4237 open = { isOpen }
@@ -78,14 +73,19 @@ export const BuilderAccordion: React.FC<BuilderAccordionProps> = ({
7873 { isOpen && (
7974 < >
8075 < Divider />
81- < div className = "flex justify-end" >
82- < ToolsSecondaryButton
83- className = "w-full xl:w-[140px]"
84- onClick = { handleDoneClick }
85- >
86- Done
87- </ ToolsSecondaryButton >
88- </ div >
76+ { onDone && (
77+ < div className = "flex justify-end" >
78+ < ToolsSecondaryButton
79+ className = "w-full xl:w-[140px]"
80+ onClick = { ( ) => {
81+ setIsOpen ( false )
82+ onDone ( )
83+ } }
84+ >
85+ Done
86+ </ ToolsSecondaryButton >
87+ </ div >
88+ ) }
8989 </ >
9090 ) }
9191 </ details >
You can’t perform that action at this time.
0 commit comments