Skip to content

Commit

Permalink
Block Variation Picker: adds support to declarated icon with src (#46373
Browse files Browse the repository at this point in the history
)

* Block Variation Picker: adds support to declarated icon with src

* improve guard
  • Loading branch information
gigitux authored Dec 21, 2022
1 parent db0ff52 commit a16ec51
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ function BlockVariationPicker( {
<li key={ variation.name }>
<Button
variant="secondary"
icon={ variation.icon }
icon={
variation.icon && variation.icon.src
? variation.icon.src
: variation.icon
}
iconSize={ 48 }
onClick={ () => onSelect( variation ) }
className="block-editor-block-variation-picker__variation"
Expand Down

1 comment on commit a16ec51

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3748093844
📝 Reported issues:

Please sign in to comment.