Skip to content

Commit

Permalink
[@mantine/core] Drawer: Add missing Styles API selector for body (#3056)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Nov 28, 2022
1 parent c0379f4 commit fd08c2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/mantine-core/src/Drawer/Drawer.styles.ts
Expand Up @@ -52,6 +52,7 @@ export default createStyles(
(theme, { position, size, zIndex, withOverlay }: DrawerStylesParams) => ({
closeButton: {},
overlay: {},
body: {},

root: {
position: 'fixed',
Expand Down
4 changes: 3 additions & 1 deletion src/mantine-core/src/Drawer/Drawer.tsx
Expand Up @@ -265,7 +265,9 @@ export function Drawer(props: DrawerProps) {
</div>
)}

<div id={bodyId}>{children}</div>
<div id={bodyId} className={classes.body}>
{children}
</div>
</Paper>

{withOverlay && (
Expand Down
3 changes: 2 additions & 1 deletion src/mantine-styles-api/src/styles-api/Drawer.styles-api.ts
Expand Up @@ -3,8 +3,9 @@ import { DrawerStylesNames } from '@mantine/core';
export const Drawer: Record<DrawerStylesNames, string> = {
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',
};

0 comments on commit fd08c2f

Please sign in to comment.