From b9a85f3bc819ce5db90f8ea27d22bebd7ead5b38 Mon Sep 17 00:00:00 2001 From: khairulhaaziq Date: Sun, 16 Jul 2023 03:33:58 +0800 Subject: [PATCH] tooltip style --- docs/content/components/dropdown-menu.md | 456 +++++++++++------------ docs/content/components/tooltip.md | 21 +- 2 files changed, 238 insertions(+), 239 deletions(-) diff --git a/docs/content/components/dropdown-menu.md b/docs/content/components/dropdown-menu.md index b0d67c8b6..0e8d5cb24 100644 --- a/docs/content/components/dropdown-menu.md +++ b/docs/content/components/dropdown-menu.md @@ -70,40 +70,40 @@ Import all parts and piece them together. import * as DropdownMenu from 'radix-vue'; export default () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); ``` @@ -114,7 +114,7 @@ export default () => ( Contains all the parts of a dropdown menu. ### Trigger -The button that toggles the dropdown menu. By default, the `DropdownMenu.Content` will position itself against the trigger. +The button that toggles the dropdown menu. By default, the `DropdownMenuContent` will position itself against the trigger. ### Portal @@ -208,7 +208,7 @@ The button that toggles the dropdown menu. By default, the `DropdownMenu.Content When used, portals the content part into the `body`. ### Content @@ -235,7 +235,7 @@ When used, portals the content part into the `body`. The component that pops out when the dropdown menu is open. ### Arrow -An optional arrow element to render alongside the dropdown menu. This can be used to help visually link the trigger with the `DropdownMenu.Content`. Must be rendered inside `DropdownMenu.Content`. +An optional arrow element to render alongside the dropdown menu. This can be used to help visually link the trigger with the `DropdownMenuContent`. Must be rendered inside `DropdownMenuContent`. ### Item @@ -531,7 +531,7 @@ An optional arrow element to render alongside the dropdown menu. This can be use The component that contains the dropdown menu items. ### Group -Used to group multiple `DropdownMenu.Item`s. +Used to group multiple `DropdownMenuItem`s. ### Label @@ -613,7 +613,7 @@ Used to group multiple `DropdownMenu.Item`s. Used to render a label. It won't be focusable using arrow keys. ### CheckboxItem @@ -629,7 +629,7 @@ Used to render a label. It won't be focusable using arrow keys. An item that can be controlled and rendered like a checkbox. ### RadioGroup -Used to group multiple `DropdownMenu.RadioItem`s. +Used to group multiple `DropdownMenuRadioItem`s. ### RadioItem @@ -740,7 +740,7 @@ Used to group multiple `DropdownMenu.RadioItem`s. An item that can be controlled and rendered like a radio. ### ItemIndicator -Renders when the parent `DropdownMenu.CheckboxItem` or `DropdownMenu.RadioItem` is checked. You can style this element directly, or you can use it as a wrapper to put an icon into, or both. +Renders when the parent `DropdownMenuCheckboxItem` or `DropdownMenuRadioItem` is checked. You can style this element directly, or you can use it as a wrapper to put an icon into, or both. ### Separator @@ -847,7 +847,7 @@ Renders when the parent `DropdownMenu.CheckboxItem` or `DropdownMenu.RadioItem` Used to visually separate items in the dropdown menu. ### Sub @@ -863,7 +863,7 @@ Used to visually separate items in the dropdown menu. Contains all the parts of a submenu. ### SubTrigger -An item that opens a submenu. Must be rendered inside `DropdownMenu.Sub`. +An item that opens a submenu. Must be rendered inside `DropdownMenuSub`. ### SubContent -The component that pops out when a submenu is open. Must be rendered inside `DropdownMenu.Sub`. +The component that pops out when a submenu is open. Must be rendered inside `DropdownMenuSub`. ## Examples ### With submenus -You can create submenus by using `DropdownMenu.Sub` in combination with its parts. +You can create submenus by using `DropdownMenuSub` in combination with its parts. ```jsx line=8-17 - - - - - - - - - Sub menu → - - - Sub menu item - Sub menu item - - - - - - - - - + + + + + + + + + Sub menu → + + + Sub menu item + Sub menu item + + + + + + + + + ``` ### With disabled items @@ -1224,17 +1224,17 @@ import * as DropdownMenu from 'radix-vue'; import './styles.css'; export default () => ( - - - - - + + + + + … - - - - - + + + + + ); ``` @@ -1250,18 +1250,18 @@ export default () => ( Use the `Separator` part to add a separator between items. ```jsx line=6,8 - - - - - - - - - - - - + + + + + + + + + + + + ``` ### With labels @@ -1269,17 +1269,17 @@ Use the `Separator` part to add a separator between items. Use the `Label` part to help label a section. ```jsx line=5 - - - - - Label - - - - - - + + + + + Label + + + + + + ``` ### With checkbox items @@ -1295,25 +1295,25 @@ export default () => { const [checked, setChecked] = React.useState(true); return ( - - - - - - - - + + + + + + + - + - + Checkbox item - - - - + + + + ); }; ``` @@ -1331,33 +1331,33 @@ export default () => { const [color, setColor] = React.useState('blue'); return ( - - - - - - - + + + + + + + - + Red - - - + + + - + Blue - - - + + + - + Green - - - - - + + + + + ); }; ``` @@ -1370,21 +1370,21 @@ You can add extra decorative elements in the `Item` parts, such as images. import * as DropdownMenu from 'radix-vue'; export default () => ( - - - - - + + + + + Adolfo Hess - - + + Miyah Myles - - - - + + + + ); ``` @@ -1400,14 +1400,14 @@ import * as DropdownMenu from 'radix-vue'; import './styles.css'; export default () => ( - - - - + + + + … - - - + + + ); ``` @@ -1429,14 +1429,14 @@ import * as DropdownMenu from 'radix-vue'; import './styles.css'; export default () => ( - - - - + + + + … - - - + + + ); ``` @@ -1469,14 +1469,14 @@ import * as DropdownMenu from 'radix-vue'; import './styles.css'; export default () => ( - - - - + + + + … - - - + + + ); ``` @@ -1523,12 +1523,12 @@ Adheres to the [Menu Button WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA ### Keyboard Interactions ## Custom APIs @@ -1590,7 +1590,7 @@ Create your own API by abstracting the primitive parts into your own component. ### Abstract the arrow and item indicators -This example abstracts the `DropdownMenu.Arrow` and `DropdownMenu.ItemIndicator` parts. It also wraps implementation details for `CheckboxItem` and `RadioItem`. +This example abstracts the `DropdownMenuArrow` and `DropdownMenuItemIndicator` parts. It also wraps implementation details for `CheckboxItem` and `RadioItem`. #### Usage diff --git a/docs/content/components/tooltip.md b/docs/content/components/tooltip.md index c7c7c378b..0080fa31d 100644 --- a/docs/content/components/tooltip.md +++ b/docs/content/components/tooltip.md @@ -382,7 +382,7 @@ import {