diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerCustomSize.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerCustomSize.stories.tsx
index 768179d12a3994..89bf8ad7e63181 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerCustomSize.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerCustomSize.stories.tsx
@@ -54,7 +54,7 @@ export const CustomSize = () => {
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerInline.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerInline.stories.tsx
index d373f672abd20e..5670a0054b041e 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerInline.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerInline.stories.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { DrawerBody, DrawerHeader, DrawerHeaderTitle, DrawerInline } from '@fluentui/react-drawer';
-import { Button, makeStyles, shorthands } from '@fluentui/react-components';
+import { Button, makeStyles, shorthands, tokens } from '@fluentui/react-components';
import { Dismiss24Regular } from '@fluentui/react-icons';
const useStyles = makeStyles({
@@ -18,6 +18,7 @@ const useStyles = makeStyles({
display: 'flex',
justifyContent: 'center',
alignItems: 'flex-start',
+ columnGap: tokens.spacingHorizontalXS,
},
});
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerOverlay.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerOverlay.stories.tsx
index 378561c7e844ad..19d7a0ff809780 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerOverlay.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerOverlay.stories.tsx
@@ -30,7 +30,7 @@ export const Overlay = () => {
);
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerOverlayNoModal.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerOverlayNoModal.stories.tsx
new file mode 100644
index 00000000000000..837da6e6ada887
--- /dev/null
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerOverlayNoModal.stories.tsx
@@ -0,0 +1,37 @@
+import * as React from 'react';
+import { DrawerBody, DrawerHeader, DrawerHeaderTitle, DrawerOverlay } from '@fluentui/react-drawer';
+import { Button } from '@fluentui/react-components';
+import { Dismiss24Regular } from '@fluentui/react-icons';
+
+export const OverlayNoModal = () => {
+ const [isOpen, setIsOpen] = React.useState(false);
+
+ return (
+
+
setIsOpen(open)}>
+
+ }
+ onClick={() => setIsOpen(false)}
+ />
+ }
+ >
+ Overlay Drawer
+
+
+
+
+ Drawer content
+
+
+
+
+
+ );
+};
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerPosition.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerPosition.stories.tsx
index f03b9ab987e04a..2b05d2b2f00825 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerPosition.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerPosition.stories.tsx
@@ -1,15 +1,36 @@
import * as React from 'react';
-import { DrawerBody, DrawerHeader, DrawerHeaderTitle, DrawerOverlay } from '@fluentui/react-drawer';
-import { Button } from '@fluentui/react-components';
+import { DrawerBody, DrawerHeader, DrawerHeaderTitle, DrawerOverlay, DrawerProps } from '@fluentui/react-drawer';
+import { Button, makeStyles, tokens } from '@fluentui/react-components';
import { Dismiss24Regular } from '@fluentui/react-icons';
+const useStyles = makeStyles({
+ content: {
+ display: 'flex',
+ justifyContent: 'center',
+ alignItems: 'flex-start',
+ columnGap: tokens.spacingHorizontalXS,
+ },
+});
+
export const Position = () => {
- const [leftOpen, setLeftOpen] = React.useState(false);
- const [rightOpen, setRightOpen] = React.useState(false);
+ const styles = useStyles();
+
+ const [isOpen, setIsOpen] = React.useState(false);
+ const [position, setPosition] = React.useState
('left');
+
+ const onClickLeftButton = React.useCallback(() => {
+ setPosition('left');
+ setIsOpen(true);
+ }, []);
+
+ const onClickRightButton = React.useCallback(() => {
+ setPosition('right');
+ setIsOpen(true);
+ }, []);
return (
-
setLeftOpen(open)}>
+ setIsOpen(open)}>
{
appearance="subtle"
aria-label="Close"
icon={}
- onClick={() => setLeftOpen(false)}
+ onClick={() => setIsOpen(false)}
/>
}
>
- Left Drawer
+ {position === 'left' ? 'Left' : 'Right'} Drawer
@@ -30,34 +51,15 @@ export const Position = () => {
-
-
-
-
- setRightOpen(open)}>
-
- }
- onClick={() => setRightOpen(false)}
- />
- }
- >
- Right Drawer
-
-
+
+
-
- Drawer content
-
-
+
+
);
};
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerPreventClose.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerPreventClose.stories.tsx
index 58a476fe141f79..d573b7be507c8a 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerPreventClose.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerPreventClose.stories.tsx
@@ -30,7 +30,7 @@ export const PreventClose = () => {
);
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerResizable.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerResizable.stories.tsx
index 9b7dc34768369e..a6a6fe9aa67b96 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerResizable.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerResizable.stories.tsx
@@ -63,6 +63,7 @@ export const Resizable = () => {
React.useEffect(() => {
window.addEventListener('mousemove', resize);
window.addEventListener('mouseup', stopResizing);
+
return () => {
window.removeEventListener('mousemove', resize);
window.removeEventListener('mouseup', stopResizing);
diff --git a/packages/react-components/react-drawer/stories/Drawer/DrawerResponsive.stories.tsx b/packages/react-components/react-drawer/stories/Drawer/DrawerResponsive.stories.tsx
index 505d012042fcbf..56aac7be93c221 100644
--- a/packages/react-components/react-drawer/stories/Drawer/DrawerResponsive.stories.tsx
+++ b/packages/react-components/react-drawer/stories/Drawer/DrawerResponsive.stories.tsx
@@ -1,6 +1,7 @@
import * as React from 'react';
import { DrawerBody, DrawerHeader, DrawerHeaderTitle, Drawer, DrawerProps } from '@fluentui/react-drawer';
-import { makeStyles, shorthands, tokens } from '@fluentui/react-components';
+import { Button, makeStyles, shorthands, tokens } from '@fluentui/react-components';
+import { Dismiss24Regular } from '@fluentui/react-icons';
const useStyles = makeStyles({
root: {
@@ -15,6 +16,8 @@ const useStyles = makeStyles({
content: {
...shorthands.margin(tokens.spacingVerticalXL, tokens.spacingHorizontalXL),
...shorthands.flex(1),
+
+ gridRowGap: tokens.spacingVerticalXXL,
},
});
@@ -26,6 +29,8 @@ export const Responsive = () => {
const [isOpen, setIsOpen] = React.useState(true);
const [type, setType] = React.useState