From c4c9b0a39ab5374056f3a543fe858ec5147779d2 Mon Sep 17 00:00:00 2001
From: Mayank <9084735+mayank99@users.noreply.github.com>
Date: Tue, 26 Sep 2023 17:10:09 -0400
Subject: [PATCH 1/8] add Popover docs and fix focus
---
apps/website/src/pages/docs/popover.mdx | 64 ++++++++++++++++
examples/Popover.focus.tsx | 54 +++++++++++++
examples/Popover.main.tsx | 18 +++++
examples/Popover.placement.tsx | 46 +++++++++++
examples/index.tsx | 13 ++++
.../src/core/Popover/Popover.tsx | 76 ++++++++++++-------
6 files changed, 243 insertions(+), 28 deletions(-)
create mode 100644 apps/website/src/pages/docs/popover.mdx
create mode 100644 examples/Popover.focus.tsx
create mode 100644 examples/Popover.main.tsx
create mode 100644 examples/Popover.placement.tsx
diff --git a/apps/website/src/pages/docs/popover.mdx b/apps/website/src/pages/docs/popover.mdx
new file mode 100644
index 00000000000..16ec8e5b067
--- /dev/null
+++ b/apps/website/src/pages/docs/popover.mdx
@@ -0,0 +1,64 @@
+---
+title: Popover
+description: An overlay dialog placed next to a trigger element.
+layout: ./_layout.astro
+propsPath: '@itwin/itwinui-react/esm/core/Popover/Popover.d.ts'
+group: utilities
+thumbnail: #TODO
+---
+
+import PropsTable from '~/components/PropsTable.astro';
+import LiveExample from '~/components/LiveExample.astro';
+import * as AllExamples from 'examples';
+
+Popover is a utility component for displaying overlay content in a dialog that is placed relative to a trigger element.
+
+
+
+
+
+By default, Popover does not add any styling. The `applyBackground` prop can be used to add the recommended background, box-shadow, border, etc.
+
+## Usage
+
+The content shown inside the Popover is passed using the `content` prop. The trigger element is specified by the child element that Popover wraps around.
+
+For everything to work correctly, the trigger element must:
+
+- be a button
+- forward its ref
+- delegate (spread) any arbitrary props
+
+If you use a native `