Skip to content

🎥 Make videos programmatically with React

fix tabindex of tabs

Jonny Burger4fbc5dc6c0ab
diff --git a/packages/cli/src/editor/components/Tabs/index.tsx b/packages/cli/src/editor/components/Tabs/index.tsx
index 1d6c06e18d..db1b165c02 100644
--- a/packages/cli/src/editor/components/Tabs/index.tsx
+++ b/packages/cli/src/editor/components/Tabs/index.tsx
@@ -4,6 +4,7 @@ import {
LIGHT_TEXT,
SELECTED_BACKGROUND,
} from '../../helpers/colors';
+import {useZIndex} from '../../state/z-index';
const tabsContainer: React.CSSProperties = {
display: 'flex',
@@ -38,6 +39,7 @@ export const Tab: React.FC<{
selected: boolean;
}> = ({children, onClick, style, selected}) => {
const [hovered, setHovered] = useState(false);
+ const {tabIndex} = useZIndex();
const onPointerEnter = useCallback(() => {
setHovered(true);
@@ -65,6 +67,7 @@ export const Tab: React.FC<{
style={definiteStyle}
type="button"
onClick={onClick}
+ tabIndex={tabIndex}
onPointerLeave={onPointerLeave}
onPointerEnter={onPointerEnter}
>