Skip to content

Commit

Permalink
fix: more Gatsby webpack conflicts b/w e.g. 'useToggle.tsx' and 'useT…
Browse files Browse the repository at this point in the history
…oggle.mdx'
  • Loading branch information
bradenmacdonald committed Jan 14, 2025
1 parent 6be0094 commit 8979107
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/DataTable/CollapsibleButtonGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';

import { MoreVert } from '../../icons';
import useToggle from '../hooks/useToggleHook';
import useWindowSize from '../hooks/useWindowSize';
import useWindowSize from '../hooks/useWindowSizeHook';
import DataTableContext from './DataTableContext';
import Icon from '../Icon';
import IconButton from '../IconButton';
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/DropdownFilters.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useContext, useMemo } from 'react';
import DataTableContext from './DataTableContext';
import { DropdownButton } from '../Dropdown';
import useWindowSize from '../hooks/useWindowSize';
import useWindowSize from '../hooks/useWindowSizeHook';
import breakpoints from '../utils/breakpoints';

/** The first filter will be as an input, additional filters will be available in a dropdown. */
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/tests/BulkActions.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { useWindowSize, Button } from '../..';
import DataTableContext from '../DataTableContext';

jest.mock('../../hooks/useWindowSize');
jest.mock('../../hooks/useWindowSizeHook');
useWindowSize.mockReturnValue({ width: 800 });

const FIRST_ACTION = 'First Action';
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/tests/DropdownFilters.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import DropdownFilters from '../DropdownFilters';
import { useWindowSize } from '../..';
import DataTableContext from '../DataTableContext';

jest.mock('../../hooks/useWindowSize');
jest.mock('../../hooks/useWindowSizeHook');

const instance = {
columns: [
Expand Down
2 changes: 1 addition & 1 deletion src/DataTable/tests/TableActions.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '../..';
import DataTableContext from '../DataTableContext';

jest.mock('../../hooks/useWindowSize');
jest.mock('../../hooks/useWindowSizeHook');
useWindowSize.mockReturnValue({ width: 800 });

function FirstAction({
Expand Down
2 changes: 1 addition & 1 deletion src/Modal/ModalDialogBody.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import useIsVisible from '../hooks/useIsVisible';
import useIsVisible from '../hooks/useIsVisibleHook';

function ModalDialogBody({
as,
Expand Down
4 changes: 2 additions & 2 deletions src/Scrollable/Scrollable.test.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { render, screen } from '@testing-library/react'; // (or /dom, /vue, ...)
import useIsVisible from '../hooks/useIsVisible';
import useIsVisible from '../hooks/useIsVisibleHook';

import Scrollable, { CLASSNAME_SCROLL_BOTTOM, CLASSNAME_SCROLL_TOP } from '.';

jest.mock('../hooks/useIsVisible');
jest.mock('../hooks/useIsVisibleHook');

function rangeOfNumbers() {
return Array.from({ length: 50 }, (v, k) => k + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/Scrollable/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

import useIsVisible from '../hooks/useIsVisible';
import useIsVisible from '../hooks/useIsVisibleHook';

export const CLASSNAME_SCROLL_TOP = 'pgn__scrollable-body-scroll-top';
export const CLASSNAME_SCROLL_BOTTOM = 'pgn__scrollable-body-scroll-bottom';
Expand Down
2 changes: 1 addition & 1 deletion src/Stepper/StepperHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import StepperHeaderStep from './StepperHeaderStep';
import { StepperContext } from './StepperContext';
import useWindowSize from '../hooks/useWindowSize';
import useWindowSize from '../hooks/useWindowSizeHook';
import breakpoints, { Size } from '../utils/breakpoints';

function StepListSeparator() {
Expand Down
2 changes: 1 addition & 1 deletion src/Stepper/tests/Stepper.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { stepsReducer } from '../StepperContext';

const mockWindowSize = { width: 1000, height: 1000 };

jest.mock('../../hooks/useWindowSize', () => () => mockWindowSize);
jest.mock('../../hooks/useWindowSizeHook', () => () => mockWindowSize);

function Example({
// eslint-disable-next-line react/prop-types
Expand Down
2 changes: 1 addition & 1 deletion src/Truncate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {
} from 'react';
import PropTypes from 'prop-types';
import { truncateLines } from './utils';
import useWindowSize from '../hooks/useWindowSize';
import useWindowSize from '../hooks/useWindowSizeHook';

const DEFAULT_TRUNCATE_LINES = 1;
const DEFAULT_TRUNCATE_ELLIPSIS = '...';
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export { default as ModalLayer } from './Modal/ModalLayer';
export { default as Overlay, OverlayTrigger } from './Overlay';
export { default as Portal } from './Modal/Portal';
export { default as Tooltip } from './Tooltip';
export { default as useWindowSize, type WindowSizeData } from './hooks/useWindowSize';
export { default as useWindowSize, type WindowSizeData } from './hooks/useWindowSizeHook';
export { default as useToggle, type Toggler, type ToggleHandlers } from './hooks/useToggleHook';
export { default as useArrowKeyNavigation, type ArrowKeyNavProps } from './hooks/useArrowKeyNavigationHook';
export { default as useIndexOfLastVisibleChild } from './hooks/useIndexOfLastVisibleChildHook';
export { default as useIsVisible } from './hooks/useIsVisible';
export { default as useIsVisible } from './hooks/useIsVisibleHook';

// // // // // // // // // // // // // // // // // // // // // // // // // // //
// Things that don't have types
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export { default as ModalLayer } from './Modal/ModalLayer';
export { default as Overlay, OverlayTrigger } from './Overlay';
export { default as Portal } from './Modal/Portal';
export { default as Tooltip } from './Tooltip';
export { default as useWindowSize } from './hooks/useWindowSize';
export { default as useWindowSize } from './hooks/useWindowSizeHook';
export { default as useToggle } from './hooks/useToggleHook';
export { default as useArrowKeyNavigation } from './hooks/useArrowKeyNavigationHook';
export { default as useIndexOfLastVisibleChild } from './hooks/useIndexOfLastVisibleChildHook';
export { default as useIsVisible } from './hooks/useIsVisible';
export { default as useIsVisible } from './hooks/useIsVisibleHook';

// // // // // // // // // // // // // // // // // // // // // // // // // // //
// Things that don't have types
Expand Down

0 comments on commit 8979107

Please sign in to comment.