/* * (c) Copyright 2026 Palantir Technologies Inc. All rights reserved. */ import type { Meta, StoryObj } from "@storybook/react-vite"; import { useArgs, useCallback, useState } from "storybook/preview-api"; import { Flex } from "@blueprintjs/labs"; import { Position } from "../../common"; import { Button } from "../button/buttons"; import { Drawer, type DrawerProps, DrawerSize } from "./drawer"; const meta: Meta = { title: "Core/Overlays/Drawer", component: Drawer, decorators: [ Story => ( ), ], args: { isOpen: true, title: "Drawer Title", icon: "cog", position: "right", size: DrawerSize.STANDARD, isCloseButtonShown: true, hasBackdrop: true, transitionDuration: 0, transitionName: "no-transition", }, argTypes: { position: { control: "select", options: [Position.TOP, Position.BOTTOM, Position.LEFT, Position.RIGHT], }, size: { control: "select", options: [DrawerSize.SMALL, DrawerSize.STANDARD, DrawerSize.LARGE], }, isOpen: { control: "boolean", }, isCloseButtonShown: { control: "boolean", }, hasBackdrop: { control: "boolean", }, icon: { control: "text", }, onClose: { action: "closed" }, }, } satisfies Meta; export default meta; type Story = StoryObj; function DrawerStoryRender(args: DrawerProps) { const [, updateArgs] = useArgs(); const handleOpen = useCallback(() => updateArgs({ isOpen: true }), [updateArgs]); const handleClose = useCallback(() => updateArgs({ isOpen: false }), [updateArgs]); return ( <>

Drawer body content. Use the Storybook controls to adjust props.

); }, };