Skip to content

Commit 9d90836

Browse files
committed
support IconTabBar mode
1 parent 9f5c341 commit 9d90836

File tree

5 files changed

+274
-193
lines changed

5 files changed

+274
-193
lines changed

packages/main/src/components/ObjectPage/ObjectPageUtils.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ export function navigateSections({ e, onKeyDown, componentName }: NavigateSectio
5555
e.currentTarget.tabIndex = -1;
5656
prevSibling.tabIndex = 0;
5757
prevSibling.focus({ preventScroll: true });
58-
prevSibling.scrollIntoView({
59-
behavior: 'instant',
60-
block: 'start',
61-
});
58+
prevSibling.scrollIntoView({ behavior: 'instant', block: 'start' });
6259
}
6360
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { createContext, useContext } from 'react';
2+
import { ObjectPageMode } from '../../enums/ObjectPageMode.js';
3+
import type { ObjectPagePropTypes } from './types/index.js';
4+
5+
export const ObjectPageContext = createContext<ObjectPagePropTypes['mode']>(ObjectPageMode.Default);
6+
7+
export const useObjectPageContext = () => useContext(ObjectPageContext);

0 commit comments

Comments
 (0)