From fd08c2fa4e52720d62c07f7cda1e547b37900079 Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Mon, 28 Nov 2022 13:59:25 +0400 Subject: [PATCH] [@mantine/core] Drawer: Add missing Styles API selector for body (#3056) --- src/mantine-core/src/Drawer/Drawer.styles.ts | 1 + src/mantine-core/src/Drawer/Drawer.tsx | 4 +++- src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mantine-core/src/Drawer/Drawer.styles.ts b/src/mantine-core/src/Drawer/Drawer.styles.ts index d86751ee140..3723a4a4e2c 100644 --- a/src/mantine-core/src/Drawer/Drawer.styles.ts +++ b/src/mantine-core/src/Drawer/Drawer.styles.ts @@ -52,6 +52,7 @@ export default createStyles( (theme, { position, size, zIndex, withOverlay }: DrawerStylesParams) => ({ closeButton: {}, overlay: {}, + body: {}, root: { position: 'fixed', diff --git a/src/mantine-core/src/Drawer/Drawer.tsx b/src/mantine-core/src/Drawer/Drawer.tsx index 648097e321a..e3ae97f071c 100644 --- a/src/mantine-core/src/Drawer/Drawer.tsx +++ b/src/mantine-core/src/Drawer/Drawer.tsx @@ -265,7 +265,9 @@ export function Drawer(props: DrawerProps) { )} -
{children}
+
+ {children} +
{withOverlay && ( diff --git a/src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts b/src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts index 29402682b62..da1e477af8c 100644 --- a/src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts +++ b/src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts @@ -3,8 +3,9 @@ import { DrawerStylesNames } from '@mantine/core'; export const Drawer: Record = { root: 'Root element', overlay: 'Overlay', - drawer: 'Drawer body element', + drawer: 'Drawer element, contains header and body', header: 'Drawer header, contains close button and title', + body: 'Drawer body, contains children', title: 'Modal title', closeButton: 'Close button', };