@@ -46,7 +46,7 @@ export const EditorTabs = () => {
4646 tracking . trackAddQueryTab ( { screen : Screen . EDITOR } ) ;
4747 } ;
4848
49- const handleCloseTab = ( event : React . MouseEvent < SVGSVGElement , MouseEvent > , idx : number ) => {
49+ const handleCloseTab = ( event : React . MouseEvent < HTMLElement , MouseEvent > , idx : number ) => {
5050 event . stopPropagation ( ) ;
5151 closeTab ( idx ) ;
5252 tracking . trackDeleteQueryTab ( { screen : Screen . EDITOR } ) ;
@@ -59,58 +59,57 @@ export const EditorTabs = () => {
5959 value = { useStore . getState ( ) . activeTabIndex . toString ( ) }
6060 onChange = { handleTabsChange }
6161 className = { classNames (
62- "w-full h-12 pt-2 px-1 mb-[0.1rem] overflow-x-auto whitespace-nowrap rounded-t-xl border-b-0 z-0" ,
62+ "w-full pt-2 px-1 overflow-hidden whitespace-nowrap rounded-t-xl border-b-0 z-0" ,
6363 theme . theme === Theme . LIGHT ? "bg-neutral-10" : "bg-draculaDark"
6464 ) }
6565 >
6666 { useStore . getState ( ) . tabs ?. map ( ( tab , idx ) => {
6767 return (
6868 < Tabs . Tab
69- htmlAttributes = { {
70- "data-test-query-editor-tab" : tab . title ,
71- } }
7269 key = { idx . toString ( ) }
73- tabId = { idx . toString ( ) }
70+ id = { idx . toString ( ) }
7471 className = { theme . theme === Theme . LIGHT ? "ndl-theme-light" : "ndl-theme-dark" }
7572 >
76- < div className = "flex justify-center items-center" >
73+ < div className = "flex justify-center items-center" data-test-query-editor-tab = { tab . title } >
7774 < span className = "truncate" style = { { maxWidth : "7rem" } } title = { tab . title } >
7875 { tab . title }
7976 </ span >
8077
8178 { useStore . getState ( ) . tabs . length > 1 && (
82- < XMarkIconOutline
83- data-test-close-icon-query-editor-tab
84- className = { classNames (
85- "h-5 w-5 ml-2" ,
86- theme . theme === Theme . LIGHT ? "hover:bg-neutral-10" : "hover:bg-neutral-50"
87- ) }
79+ < button
80+ data-test-close-icon-query-editor-tab = "true"
8881 aria-label = "Close Icon"
8982 onClick = { ( event ) => {
9083 handleCloseTab ( event , idx ) ;
9184 } }
92- />
85+ className = "flex items-center bg-transparent border-0 p-0 cursor-pointer"
86+ >
87+ < XMarkIconOutline
88+ className = { classNames (
89+ "h-5 w-5 ml-2" ,
90+ theme . theme === Theme . LIGHT ? "hover:bg-neutral-10" : "hover:bg-neutral-50"
91+ ) }
92+ />
93+ </ button >
9394 ) }
9495 </ div >
9596 </ Tabs . Tab >
9697 ) ;
9798 } ) }
98- < Tabs . Tab
99- htmlAttributes = { {
100- "data-test-new-query-editor-tab" : "true" ,
101- } }
102- key = "new"
103- tabId = "new"
104- className = "vertical-align-bottom"
105- >
106- < PlusIconOutline
107- className = { classNames (
108- "h-5 w-5" ,
109- theme . theme === Theme . LIGHT ? "hover:bg-neutral-10" : "text-neutral-10 hover:bg-neutral-50"
110- ) }
99+ < Tabs . Tab key = "new" id = "new" className = "vertical-align-bottom" >
100+ < button
101+ data-test-new-query-editor-tab = "true"
111102 aria-label = "Add tab Icon"
112103 onClick = { handleAddTab }
113- />
104+ className = "flex items-center bg-transparent border-0 p-0 cursor-pointer"
105+ >
106+ < PlusIconOutline
107+ className = { classNames (
108+ "h-5 w-5" ,
109+ theme . theme === Theme . LIGHT ? "hover:bg-neutral-10" : "text-neutral-10 hover:bg-neutral-50"
110+ ) }
111+ />
112+ </ button >
114113 </ Tabs . Tab >
115114 </ Tabs >
116115 ) ;
0 commit comments