Skip to content

Commit

Permalink
Update code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Dec 26, 2024
1 parent d0c4317 commit 8e20d65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/components/src/dropdown-menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const MyDropdownMenu = () => (
<DropdownMenu
icon={ more }
label="Select a direction"
toggleProps={ { size: 'compact' } }
controls={ [
{
title: 'Up',
Expand Down Expand Up @@ -100,7 +101,11 @@ import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
import { more, arrowUp, arrowDown, trash } from '@wordpress/icons';

const MyDropdownMenu = () => (
<DropdownMenu icon={ more } label="Select a direction">
<DropdownMenu
icon={ more }
label="Select a direction"
toggleProps={ { size: 'compact' } }
>
{ ( { onClose } ) => (
<>
<MenuGroup>
Expand Down
7 changes: 6 additions & 1 deletion packages/components/src/dropdown-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {
* <DropdownMenu
* icon={ more }
* label="Select a direction"
* toggleProps={ { size: 'compact' } }
* controls={ [
* {
* title: 'Up',
Expand Down Expand Up @@ -291,7 +292,11 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {
* import { more, arrowUp, arrowDown, trash } from '@wordpress/icons';
*
* const MyDropdownMenu = () => (
* <DropdownMenu icon={ more } label="Select a direction">
* <DropdownMenu
* icon={ more }
* label="Select a direction"
* toggleProps={ { size: 'compact' } }
* >
* { ( { onClose } ) => (
* <>
* <MenuGroup>
Expand Down

0 comments on commit 8e20d65

Please sign in to comment.