From f334028366879f95768b1a587225cc3ae5b580bf Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Mon, 23 Dec 2024 11:43:54 +0100 Subject: [PATCH] Generate README --- packages/components/src/menu/README.md | 535 ++++++++++++------ .../components/src/menu/docs-manifest.json | 62 ++ 2 files changed, 422 insertions(+), 175 deletions(-) create mode 100644 packages/components/src/menu/docs-manifest.json diff --git a/packages/components/src/menu/README.md b/packages/components/src/menu/README.md index 6732610c0c6cae..575037db2b1abe 100644 --- a/packages/components/src/menu/README.md +++ b/packages/components/src/menu/README.md @@ -1,344 +1,529 @@ -# `Menu` +# Menu -
-This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes. -
+ -`Menu` displays a menu to the user (such as a set of actions or functions). The menu is rendered in a popover (this pattern is also known as a "Dropdown menu"), which is triggered by a button. +

See the WordPress Storybook for more detailed, interactive documentation.

-## Design guidelines +## Props -### Usage +### `as` -#### When to use a `Menu` +The HTML element or React component to render the component as. -Use a `Menu` when you want users to: + - Type: `"symbol" | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | ... 516 more ... | ("view" & FunctionComponent<...>)` + - Required: No -- Choose an action or change a setting from a list, AND -- Only see the available choices contextually. +### `children` -`Menu` is a React component to render an expandable menu of buttons. It is similar in purpose to a `