From 5fe48605ce5d5a87c245679b2d7e2e1bc80631b9 Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Fri, 8 Dec 2023 17:49:41 +0400 Subject: [PATCH] [refactor] Fix errors in tests --- packages/@mantine/core/src/components/Drawer/Drawer.test.tsx | 2 +- packages/@mantine/core/src/components/Drawer/DrawerHeader.tsx | 2 +- packages/@mantine/core/src/components/Modal/Modal.test.tsx | 2 +- packages/@mantine/core/src/components/Modal/ModalHeader.tsx | 2 +- .../core/src/components/ModalBase/ModalBaseHeader.tsx | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@mantine/core/src/components/Drawer/Drawer.test.tsx b/packages/@mantine/core/src/components/Drawer/Drawer.test.tsx index 772aa8828fa..473437020b8 100644 --- a/packages/@mantine/core/src/components/Drawer/Drawer.test.tsx +++ b/packages/@mantine/core/src/components/Drawer/Drawer.test.tsx @@ -165,7 +165,7 @@ describe('@mantine/core/DrawerHeader', () => { variant: true, size: true, classes: true, - refType: HTMLDivElement, + refType: HTMLElement, displayName: '@mantine/core/DrawerHeader', selector: '.mantine-Drawer-header', variantSelector: '.mantine-Drawer-header', diff --git a/packages/@mantine/core/src/components/Drawer/DrawerHeader.tsx b/packages/@mantine/core/src/components/Drawer/DrawerHeader.tsx index 49c32ba469b..088ecfeef23 100644 --- a/packages/@mantine/core/src/components/Drawer/DrawerHeader.tsx +++ b/packages/@mantine/core/src/components/Drawer/DrawerHeader.tsx @@ -12,7 +12,7 @@ export interface DrawerHeaderProps export type DrawerHeaderFactory = Factory<{ props: DrawerHeaderProps; - ref: HTMLDivElement; + ref: HTMLElement; stylesNames: DrawerHeaderStylesNames; compound: true; }>; diff --git a/packages/@mantine/core/src/components/Modal/Modal.test.tsx b/packages/@mantine/core/src/components/Modal/Modal.test.tsx index 7c642a73cfb..dd5cd3c289b 100644 --- a/packages/@mantine/core/src/components/Modal/Modal.test.tsx +++ b/packages/@mantine/core/src/components/Modal/Modal.test.tsx @@ -181,7 +181,7 @@ describe('@mantine/core/ModalHeader', () => { variant: true, size: true, classes: true, - refType: HTMLDivElement, + refType: HTMLElement, displayName: '@mantine/core/ModalHeader', selector: '.mantine-Modal-header', variantSelector: '.mantine-Modal-header', diff --git a/packages/@mantine/core/src/components/Modal/ModalHeader.tsx b/packages/@mantine/core/src/components/Modal/ModalHeader.tsx index 127b8a93110..dc350141e2e 100644 --- a/packages/@mantine/core/src/components/Modal/ModalHeader.tsx +++ b/packages/@mantine/core/src/components/Modal/ModalHeader.tsx @@ -12,7 +12,7 @@ export interface ModalHeaderProps export type ModalHeaderFactory = Factory<{ props: ModalHeaderProps; - ref: HTMLDivElement; + ref: HTMLElement; stylesNames: ModalHeaderStylesNames; compound: true; }>; diff --git a/packages/@mantine/core/src/components/ModalBase/ModalBaseHeader.tsx b/packages/@mantine/core/src/components/ModalBase/ModalBaseHeader.tsx index 2fc4ada4bce..6d131abb333 100644 --- a/packages/@mantine/core/src/components/ModalBase/ModalBaseHeader.tsx +++ b/packages/@mantine/core/src/components/ModalBase/ModalBaseHeader.tsx @@ -4,9 +4,9 @@ import { Box, BoxProps, ElementProps } from '../../core'; import classes from './ModalBase.module.css'; import { useModalBaseContext } from './ModalBase.context'; -export interface ModalBaseHeaderProps extends BoxProps, ElementProps<'div'> {} +export interface ModalBaseHeaderProps extends BoxProps, ElementProps<'header'> {} -export const ModalBaseHeader = forwardRef( +export const ModalBaseHeader = forwardRef( ({ className, ...others }, ref) => { const ctx = useModalBaseContext(); return (