Skip to content

Commit

Permalink
LoginOut: Add dropdown menu props to ToolsPanel component (WordPress#…
Browse files Browse the repository at this point in the history
…68009)

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
  • Loading branch information
3 people authored and yogeshbhutkar committed Dec 18, 2024
1 parent 1f04074 commit b1b0276
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/loginout/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ import {
__experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

export default function LoginOutEdit( { attributes, setAttributes } ) {
const { displayLoginAsForm, redirectToCurrent } = attributes;
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

return (
<>
Expand All @@ -23,6 +28,7 @@ export default function LoginOutEdit( { attributes, setAttributes } ) {
redirectToCurrent: true,
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
label={ __( 'Display login as form' ) }
Expand Down

0 comments on commit b1b0276

Please sign in to comment.