Skip to content

Commit

Permalink
Block editor: update deprecated component prop
Browse files Browse the repository at this point in the history
See #27795

position prop is now deprecated for Dropdown and URLPopover, we must switch to the placement prop instead.
  • Loading branch information
jeherve committed Mar 14, 2023
1 parent 24640dd commit b176e8c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

General: update deprecated core prop
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const VideoDetailsActions = ( {
return (
<>
<Dropdown
position="bottom center"
placement="bottom center"
className={ styles.dropdown }
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const ThumbnailActionsDropdown = ( {

return (
<Dropdown
position="bottom left"
placement="bottom left"
renderToggle={ ( { isOpen, onToggle } ) => (
<div ref={ setAnchor }>
<Button
Expand Down Expand Up @@ -187,7 +187,7 @@ const PrivacyActionsDropdown = ( {

return (
<Dropdown
position="bottom left"
placement="bottom left"
renderToggle={ ( { isOpen, onToggle } ) => (
<div ref={ setAnchor }>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const VideoThumbnailDropdown = ( {
return (
<div className={ styles[ 'video-thumbnail-edit' ] }>
<Dropdown
position="bottom left"
placement="bottom left"
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
variant="secondary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function PosterDropdown( {
return (
<Dropdown
contentClassName="poster-panel__dropdown"
position="top left"
placement="top left"
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
ref={ buttonRef }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Blocks: update deprecated component prop.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function NewsletterAccess( { accessLevel, setPostMeta, withModal = true }
focusOnMount
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
isTertiary
variant="tertiary"
onClick={ onToggle }
aria-expanded={ isOpen }
aria-label={ sprintf(
Expand Down

0 comments on commit b176e8c

Please sign in to comment.