@@ -18,13 +18,21 @@ import { ProjectTemplateSelect } from "@/plane-web/components/projects/create/te
1818type Props = {
1919 handleClose : ( ) => void ;
2020 isMobile ?: boolean ;
21- handleFormChange ?: ( ) => void ;
21+ handleFormOnChange ?: ( ) => void ;
2222 isClosable ?: boolean ;
2323 handleTemplateSelect ?: ( ) => void ;
24+ showActionButtons ?: boolean ;
2425} ;
2526
2627function ProjectCreateHeader ( props : Props ) {
27- const { handleClose, isMobile = false , handleFormChange, isClosable = true , handleTemplateSelect } = props ;
28+ const {
29+ handleClose,
30+ isMobile = false ,
31+ handleFormOnChange,
32+ isClosable = true ,
33+ handleTemplateSelect,
34+ showActionButtons = true ,
35+ } = props ;
2836 const { watch, control, setValue } = useFormContext < IProject > ( ) ;
2937 const { t } = useTranslation ( ) ;
3038 // derived values
@@ -40,9 +48,11 @@ function ProjectCreateHeader(props: Props) {
4048 alt = { t ( "project_cover_image_alt" ) }
4149 className = "absolute left-0 top-0 h-full w-full rounded-lg"
4250 />
43- < div className = "absolute left-2.5 top-2.5" >
44- < ProjectTemplateSelect onClick = { handleTemplateSelect } />
45- </ div >
51+ { showActionButtons && (
52+ < div className = "absolute left-2.5 top-2.5" >
53+ < ProjectTemplateSelect onClick = { handleTemplateSelect } />
54+ </ div >
55+ ) }
4656 { isClosable && (
4757 < div className = "absolute right-2 top-2 p-2" >
4858 < button data-posthog = "PROJECT_MODAL_CLOSE" type = "button" onClick = { handleClose } tabIndex = { getIndex ( "close" ) } >
@@ -59,7 +69,7 @@ function ProjectCreateHeader(props: Props) {
5969 label = { t ( "change_cover" ) }
6070 onChange = { ( data ) => {
6171 onChange ( data ) ;
62- handleFormChange ?.( ) ;
72+ handleFormOnChange ?.( ) ;
6373 } }
6474 control = { control }
6575 value = { value ?? null }
@@ -101,7 +111,7 @@ function ProjectCreateHeader(props: Props) {
101111 shouldDirty : true ,
102112 } ) ;
103113 onChange ( newLogoProps ) ;
104- handleFormChange ?.( ) ;
114+ handleFormOnChange ?.( ) ;
105115 setIsOpen ( false ) ;
106116 } }
107117 defaultIconColor = { value ?. in_use && value . in_use === "icon" ? value . icon ?. color : undefined }
0 commit comments