From 9ce64937ce234d65f3e4ab28bfed1a71aac9a4de Mon Sep 17 00:00:00 2001 From: Josep Martins Date: Mon, 8 Aug 2022 12:06:01 +0200 Subject: [PATCH] Overlay documentation fixes (#2221) * Add/remove missing/nonexisting props * Add AnchoredOverlay in the navigation * Add wicked-otters-warn changeset --- .changeset/wicked-otters-warn.md | 5 ++++ docs/content/Overlay.mdx | 29 ++++++++++++------- .../src/@primer/gatsby-theme-doctocat/nav.yml | 2 ++ 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .changeset/wicked-otters-warn.md diff --git a/.changeset/wicked-otters-warn.md b/.changeset/wicked-otters-warn.md new file mode 100644 index 00000000000..43cede4e2f1 --- /dev/null +++ b/.changeset/wicked-otters-warn.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Overlay documentation fixes diff --git a/docs/content/Overlay.mdx b/docs/content/Overlay.mdx index 2d7dbba946c..90a912e9dd0 100644 --- a/docs/content/Overlay.mdx +++ b/docs/content/Overlay.mdx @@ -72,23 +72,13 @@ See the W3C accessibility recommendations for modals [here](https://www.w3.org/T ## Positioning -`Overlay` renders its `children` within a div positioned absolutely within a portal within the default portal root. The overlay will not update its positioning if the portal root's positioning changes (e.g., if the portal root is statically positioned after some DOM element that dynamically resizes). You may consider [customizing the portal or specifying a different portal root](/Portal#customizing-the-portal-root) to achieve different positioning behavior. +`Overlay` renders its `children` within a div positioned absolutely within a portal within the default portal root. The overlay will not update its positioning if the portal root's positioning changes (e.g., if the portal root is statically positioned after some DOM element that dynamically resizes). You may consider using the [AnchoredOverlay](/AnchoredOverlay) component or [customizing the portal root](/Portal#customizing-the-portal-root) to achieve different positioning behavior. ## Props ### Overlay - - Element the Overlay should be anchored to. - - } - /> } /> + + Sets the maximum height of the Overlay, pick from our set list of heights. + xsmall corresponds to 192px, small corresponds + to 256px, medium corresponds to 320px,{' '} + large corresponds to 432px, xlarge corresponds + to 600px. + + } + />