File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/compass-components/src/components/workspace-tabs Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { spacing } from '@leafygreen-ui/tokens';
55import type { GlyphName } from '@leafygreen-ui/icon' ;
66import { useSortable } from '@dnd-kit/sortable' ;
77import { CSS as cssDndKit } from '@dnd-kit/utilities' ;
8+ import { useId } from '@react-aria/utils' ;
89import { useDarkMode } from '../../hooks/use-theme' ;
910import { Icon , IconButton } from '../leafygreen' ;
1011import { mergeProps } from '../../utils/merge-props' ;
@@ -253,6 +254,8 @@ function Tab({
253254 cursor : 'grabbing !important' ,
254255 } ;
255256
257+ const tabId = useId ( ) ;
258+
256259 return (
257260 < Tooltip
258261 enabled = { ! ! tooltip }
@@ -281,6 +284,7 @@ function Tab({
281284 data-testid = "workspace-tab-button"
282285 data-connection-name = { connectionName }
283286 data-type = { type }
287+ id = { tabId }
284288 { ...tabProps }
285289 >
286290 { iconGlyph === 'Logo' && (
You can’t perform that action at this time.
0 commit comments