Skip to content

Commit 39d5707

Browse files
committed
format
1 parent a0a0fd6 commit 39d5707

5 files changed

Lines changed: 18 additions & 21 deletions

File tree

packages/gamut-styles/src/variance/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type React from 'react';
21
import { ThemeProps } from '@codecademy/variance';
32
import isPropValid from '@emotion/is-prop-valid';
3+
import type React from 'react';
44

55
import { all as allProps } from './config';
66

packages/gamut/src/Popover/types.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ export type PopoverProps = PopoverBaseProps &
9898
/**
9999
* The target element around which the popover will be positioned.
100100
*/
101-
targetRef: React.RefObject<
102-
Pick<HTMLDivElement, 'getBoundingClientRect' | 'contains'> | null
103-
>;
101+
targetRef: React.RefObject<Pick<
102+
HTMLDivElement,
103+
'getBoundingClientRect' | 'contains'
104+
> | null>;
104105

105106
/**
106107
* The PopoverContainer which contents will be rendered into.

packages/gamut/src/PopoverContainer/hooks.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { useEffect, useMemo } from 'react';
33
import { findAllAdditionalScrollingParents, findResizingParent } from './utils';
44

55
export const useScrollingParentsEffect = (
6-
targetRef: React.RefObject<
7-
Pick<HTMLDivElement, 'getBoundingClientRect' | 'contains'> | null
8-
>,
6+
targetRef: React.RefObject<Pick<
7+
HTMLDivElement,
8+
'getBoundingClientRect' | 'contains'
9+
> | null>,
910
setTargetRect: (rect: DOMRect | undefined) => void
1011
) => {
1112
useEffect(() => {
@@ -39,9 +40,10 @@ export const useScrollingParentsEffect = (
3940
};
4041

4142
export const useResizingParentEffect = (
42-
targetRef: React.RefObject<
43-
Pick<HTMLDivElement, 'getBoundingClientRect' | 'contains'> | null
44-
>,
43+
targetRef: React.RefObject<Pick<
44+
HTMLDivElement,
45+
'getBoundingClientRect' | 'contains'
46+
> | null>,
4547
setTargetRect: (rect: DOMRect | undefined) => void
4648
) => {
4749
useEffect(() => {

packages/gamut/src/utils/react.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export const extractTextContent = (children: React.ReactNode): string => {
3535
return '';
3636
}
3737
if (isValidElement(child)) {
38-
const props = child.props as { children?: React.ReactNode; text?: string };
38+
const props = child.props as {
39+
children?: React.ReactNode;
40+
text?: string;
41+
};
3942
const textContent = props.children ?? props.text ?? '';
4043
return extractTextContent(textContent);
4144
}

yarn.lock

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8251,16 +8251,7 @@ __metadata:
82518251
languageName: node
82528252
linkType: hard
82538253

8254-
"@types/react-test-renderer@npm:>=16.9.0":
8255-
version: 18.3.0
8256-
resolution: "@types/react-test-renderer@npm:18.3.0"
8257-
dependencies:
8258-
"@types/react": "npm:*"
8259-
checksum: 10c0/3c9748be52e8e659e7adf91dea6939486463264e6f633bf21c4cb116de18af7bef0595568a1e588160420b2f65289473075dda1cb417c2875df8cf7a09f5d913
8260-
languageName: node
8261-
linkType: hard
8262-
8263-
"@types/react-test-renderer@npm:^19.0.0":
8254+
"@types/react-test-renderer@npm:>=16.9.0, @types/react-test-renderer@npm:^19.0.0":
82648255
version: 19.1.0
82658256
resolution: "@types/react-test-renderer@npm:19.1.0"
82668257
dependencies:

0 commit comments

Comments
 (0)