diff --git a/packages/universal-modal/src/ResponsiveContext.ts b/packages/universal-modal/src/ResponsiveContext.ts index fc64acdc30..a11646be96 100644 --- a/packages/universal-modal/src/ResponsiveContext.ts +++ b/packages/universal-modal/src/ResponsiveContext.ts @@ -1,5 +1,5 @@ -import React from 'react'; +import { createContext } from 'react'; import type { TResponsiveModalContext } from './typings'; -export const ResponsiveContext = React.createContext(null); +export const ResponsiveContext = createContext(null); diff --git a/packages/universal-modal/src/desktop/Component.desktop.tsx b/packages/universal-modal/src/desktop/Component.desktop.tsx index 125aaf7989..f8cce4eceb 100644 --- a/packages/universal-modal/src/desktop/Component.desktop.tsx +++ b/packages/universal-modal/src/desktop/Component.desktop.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useState } from 'react'; +import React, { forwardRef, useMemo, useState } from 'react'; import { ContentDesktop } from '../components/content/Component.desktop'; import { Controls, ControlsProps } from '../components/controls'; @@ -19,10 +19,8 @@ export const UniversalModalDesktopComponent = forwardRef< const [modalHeaderHighlighted, setModalHeaderHighlighted] = useState(false); const [modalFooterHighlighted, setModalFooterHighlighted] = useState(false); - const contextValue = React.useMemo( + const contextValue = useMemo( () => ({ - view: 'desktop', - dataTestId, modalWidth, modalHeaderHighlighted, modalFooterHighlighted, @@ -30,7 +28,7 @@ export const UniversalModalDesktopComponent = forwardRef< setModalHeaderHighlighted, setModalFooterHighlighted, }), - [dataTestId, modalWidth, modalHeaderHighlighted, modalFooterHighlighted], + [modalWidth, modalHeaderHighlighted, modalFooterHighlighted], ); const renderContent = () => { diff --git a/packages/universal-modal/src/desktop/components/buttons/arrow-button/arrow-button.tsx b/packages/universal-modal/src/desktop/components/buttons/arrow-button/arrow-button.tsx index c526a0f63c..c613530096 100644 --- a/packages/universal-modal/src/desktop/components/buttons/arrow-button/arrow-button.tsx +++ b/packages/universal-modal/src/desktop/components/buttons/arrow-button/arrow-button.tsx @@ -1,6 +1,6 @@ import React, { FC, MouseEvent } from 'react'; -import { Button } from '@alfalab/core-components-button'; +import { ButtonDesktop } from '@alfalab/core-components-button/desktop'; import { Typography } from '@alfalab/core-components-typography'; import { ArrowLeftMediumMIcon } from '@alfalab/icons-glyph/ArrowLeftMediumMIcon'; @@ -14,7 +14,7 @@ export const ArrowButtonDesktop: FC = (props) => { const { onClick } = props; return ( - + ); }; diff --git a/packages/universal-modal/src/desktop/components/buttons/cross-button/cross-button.tsx b/packages/universal-modal/src/desktop/components/buttons/cross-button/cross-button.tsx index e40f4e085c..9d549c4d0b 100644 --- a/packages/universal-modal/src/desktop/components/buttons/cross-button/cross-button.tsx +++ b/packages/universal-modal/src/desktop/components/buttons/cross-button/cross-button.tsx @@ -1,6 +1,6 @@ import React, { FC } from 'react'; -import { Button } from '@alfalab/core-components-button'; +import { ButtonDesktop } from '@alfalab/core-components-button/desktop'; import { CrossMediumMIcon } from '@alfalab/icons-glyph/CrossMediumMIcon'; import styles from './cross-button.module.css'; @@ -13,7 +13,7 @@ export const CrossButtonDesktop: FC = (props) => { const { onClick } = props; return ( -