Skip to content

Commit

Permalink
LoginOut: Add dropdown menu props to ToolsPanel component (#68009)
Browse files Browse the repository at this point in the history
Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
  • Loading branch information
3 people authored Dec 16, 2024
1 parent 34d25a8 commit bc4f6c6
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 bc4f6c6

Please sign in to comment.