@@ -9,6 +9,7 @@ import { Disclosure, Transition } from "@headlessui/react";
99import { EUserPermissions , EUserPermissionsLevel , PROJECT_TRACKER_ELEMENTS } from "@plane/constants" ;
1010import { useTranslation } from "@plane/i18n" ;
1111import { ChevronRightIcon } from "@plane/propel/icons" ;
12+ import { IconButton } from "@plane/propel/icon-button" ;
1213import { TOAST_TYPE , setToast } from "@plane/propel/toast" ;
1314import { Tooltip } from "@plane/propel/tooltip" ;
1415import { Loader } from "@plane/ui" ;
@@ -178,39 +179,37 @@ export const SidebarProjectsList = observer(function SidebarProjectsList() {
178179 >
179180 < span className = "text-13 font-semibold" > { t ( "projects" ) } </ span >
180181 </ Disclosure . Button >
181- < div className = "flex items-center opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto " >
182+ < div className = "flex items-center gap-1 " >
182183 { isAuthorizedUser && (
183184 < Tooltip tooltipHeading = { t ( "create_project" ) } tooltipContent = "" >
184- < button
185- type = "button "
186- data-ph-element = { PROJECT_TRACKER_ELEMENTS . SIDEBAR_CREATE_PROJECT_TOOLTIP }
187- className = "p-0.5 rounded-sm hover:bg-layer-1 flex-shrink-0"
185+ < IconButton
186+ variant = "ghost "
187+ size = "sm"
188+ icon = { Plus }
188189 onClick = { ( ) => {
189190 setIsProjectModalOpen ( true ) ;
190191 } }
192+ data-ph-element = { PROJECT_TRACKER_ELEMENTS . SIDEBAR_CREATE_PROJECT_TOOLTIP }
193+ className = "hidden group-hover:inline-flex text-placeholder"
191194 aria-label = { t ( "aria_labels.projects_sidebar.create_new_project" ) }
192- >
193- < Plus className = "size-3" />
194- </ button >
195+ />
195196 </ Tooltip >
196197 ) }
197- < Disclosure . Button
198- as = "button "
199- type = "button "
200- className = "p-0.5 rounded-sm hover:bg-layer-1 flex-shrink-0"
198+ < IconButton
199+ variant = "ghost "
200+ size = "sm "
201+ icon = { ChevronRightIcon }
201202 onClick = { ( ) => toggleListDisclosure ( ! isAllProjectsListOpen ) }
203+ className = "text-placeholder"
204+ iconClassName = { cn ( "transition-transform" , {
205+ "rotate-90" : isAllProjectsListOpen ,
206+ } ) }
202207 aria-label = { t (
203208 isAllProjectsListOpen
204209 ? "aria_labels.projects_sidebar.close_projects_menu"
205210 : "aria_labels.projects_sidebar.open_projects_menu"
206211 ) }
207- >
208- < ChevronRightIcon
209- className = { cn ( "flex-shrink-0 size-3 transition-all" , {
210- "rotate-90" : isAllProjectsListOpen ,
211- } ) }
212- />
213- </ Disclosure . Button >
212+ />
214213 </ div >
215214 </ div >
216215 < Transition
0 commit comments