{"version":3,"file":"DrawerMenu.cjs","names":[],"sources":["../../../src/components/Menu/DrawerMenu.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, {\n  type ComponentPropsWithoutRef,\n  type ReactNode,\n  forwardRef,\n} from \"react\";\nimport styles from \"./DrawerMenu.module.css\";\nimport { getPlatform } from \"../../utils/platform\";\nimport classNames from \"classnames\";\n\ninterface Props extends ComponentPropsWithoutRef<\"div\"> {\n  /**\n   * The menu title.\n   */\n  title: string;\n  /**\n   * The menu contents.\n   */\n  children: ReactNode;\n}\n\n/**\n * A menu in a drawer, as commonly seen on mobile.\n */\n// This an internal component not intended for export! Consumers should use it\n// via the Menu or ContextMenu components.\nexport const DrawerMenu = forwardRef<HTMLDivElement, Props>(\n  ({ title, children, className, ...props }, ref) => (\n    <div\n      ref={ref}\n      className={classNames(className, styles.drawer)}\n      aria-label={title}\n      data-platform={getPlatform()}\n      {...props}\n      role=\"menu\"\n    >\n      <div className={styles.body}>{children}</div>\n    </div>\n  ),\n);\n\nDrawerMenu.displayName = \"DrawerMenu\";\n"],"mappings":";;;;;;;;;;;;AAgCA,IAAa,cAAA,GAAA,MAAA,aACV,EAAE,OAAO,UAAU,WAAW,GAAG,SAAS,QACzC,iBAAA,GAAA,kBAAA,KAAC,OAAD;CACO;CACL,YAAA,GAAA,WAAA,SAAsB,WAAW,0BAAA,QAAO,OAAO;CAC/C,cAAY;CACZ,iBAAe,iBAAA,aAAa;CAC5B,GAAI;CACJ,MAAK;WAEL,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,WAAW,0BAAA,QAAO;EAAO;EAAe,CAAA;CACzC,CAAA,CAET;AAED,WAAW,cAAc"}