Skip to content

Commit 02e01c8

Browse files
committed
update hook
1 parent 97e3fb4 commit 02e01c8

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

packages/gamut/src/Pagination/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
MiniChevronLeftIcon,
33
MiniChevronRightIcon,
44
} from '@codecademy/gamut-icons';
5-
import { useDirectionIsRtl } from '@codecademy/gamut-styles';
5+
import { useElementDir } from '@codecademy/gamut-styles';
66
import { useMemo, useRef, useState } from 'react';
77
import * as React from 'react';
88

@@ -74,7 +74,7 @@ export const Pagination: React.FC<PaginationProps> = ({
7474
const [liveText, setLiveText] = useState('');
7575
const [shownPageArray, setShownPageArray] = useState([0]);
7676
const rootRef = useRef<HTMLDivElement>(null);
77-
const isRtl = useDirectionIsRtl(rootRef);
77+
const isRtl = useElementDir(rootRef);
7878

7979
const showSkipToButtons = !!(
8080
(type === undefined && totalPages >= 10) ||

packages/styleguide/.storybook/theming/GamutThemeProvider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export const withEmotion = (Story: any, context: GlobalsContext) => {
6262
if (storyEl) storyEl.style.backgroundColor = background;
6363
}, [storyRef.current, context.globals.colorMode]);
6464

65-
// App
6665
useLayoutEffect(() => {
6766
if (typeof document === 'undefined') return;
6867
const doc = storyRef.current?.ownerDocument ?? document;

0 commit comments

Comments
 (0)