Skip to content

Commit 0bc43e6

Browse files
committed
chore(components): fix new eslint errors
1 parent c1f4197 commit 0bc43e6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/compass-components/src/components/leafygreen.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ import { Tabs, Tab } from '@leafygreen-ui/tabs';
7070
import TextArea from '@leafygreen-ui/text-area';
7171
import LeafyGreenTextInput from '@leafygreen-ui/text-input';
7272
import { SearchInput } from '@leafygreen-ui/search-input';
73-
export type { ToastProps } from '@leafygreen-ui/toast';
74-
export { ToastProvider, useToast } from '@leafygreen-ui/toast';
7573
export { usePrevious, useMergeRefs } from '@leafygreen-ui/hooks';
7674
import Toggle from '@leafygreen-ui/toggle';
7775
import Tooltip from '@leafygreen-ui/tooltip';

packages/compass-components/src/hooks/use-confirmation.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ const hideButtonStyles = css({
101101
display: 'none !important',
102102
});
103103

104-
const _ConfirmationModalArea: React.FunctionComponent = ({ children }) => {
104+
const ConfirmationModalStateHandler: React.FunctionComponent = ({
105+
children,
106+
}) => {
105107
const [confirmationProps, setConfirmationProps] = useState<
106108
Partial<ConfirmationProperties> & { open: boolean; confirmationId: number }
107109
>({
@@ -205,7 +207,7 @@ export const ConfirmationModalArea: React.FunctionComponent = ({
205207

206208
return (
207209
<ConfirmationModalAreaMountedContext.Provider value={true}>
208-
<_ConfirmationModalArea>{children}</_ConfirmationModalArea>
210+
<ConfirmationModalStateHandler>{children}</ConfirmationModalStateHandler>
209211
</ConfirmationModalAreaMountedContext.Provider>
210212
);
211213
};

packages/compass-components/src/hooks/use-toast.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { useContext, useEffect, useMemo, useRef } from 'react';
2-
import type { ToastProps } from '../components/leafygreen';
2+
import type { ToastProps } from '@leafygreen-ui/toast';
33
import {
44
ToastProvider,
55
useToast as useLeafygreenToast,
6-
} from '../components/leafygreen';
6+
} from '@leafygreen-ui/toast';
77
import { useStackedComponent } from './use-stacked-component';
88
import { css } from '..';
99

@@ -150,7 +150,7 @@ export const openToast = toastState.openToast.bind(toastState);
150150
*/
151151
export const closeToast = toastState.closeToast.bind(toastState);
152152

153-
const _ToastArea: React.FunctionComponent = ({ children }) => {
153+
const ToastStateHandler: React.FunctionComponent = ({ children }) => {
154154
// NB: the way leafygreen implements this hook leads to anything specifying
155155
// toast methods in hooks dependencies to constantly update potentially
156156
// causing infinite loops of toasts. To work around that we are storing toast
@@ -207,7 +207,7 @@ export const ToastArea: React.FunctionComponent = ({ children }) => {
207207
return (
208208
<ToastAreaMountedContext.Provider value={true}>
209209
<ToastProvider portalClassName={stackedElemStyles}>
210-
<_ToastArea>{children}</_ToastArea>
210+
<ToastStateHandler>{children}</ToastStateHandler>
211211
</ToastProvider>
212212
</ToastAreaMountedContext.Provider>
213213
);

0 commit comments

Comments
 (0)