Skip to content

Commit

Permalink
Pass resolved links to the component
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Jul 10, 2024
1 parent ed59b9a commit ef75e14
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const {
FiltersPanel: StylesFiltersPanel,
ImageSettingsPanel,
AdvancedPanel: StylesAdvancedPanel,
useGlobalStyleLinks,
} = unlock( blockEditorPrivateApis );

function ScreenBlock( { name, variation } ) {
Expand All @@ -103,6 +104,7 @@ function ScreenBlock( { name, variation } ) {
const [ rawSettings, setSettings ] = useGlobalSetting( '', name );
const settings = useSettingsForBlockElement( rawSettings, name );
const blockType = getBlockType( name );
const _links = useGlobalStyleLinks();

// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.
if (
Expand Down Expand Up @@ -311,10 +313,7 @@ function ScreenBlock( { name, variation } ) {
onChange={ setStyle }
settings={ settings }
defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
defaultControls={
blockType?.supports?.background
?.__experimentalDefaultControls
}
themeFileURIs={ _links?.[ 'wp:theme-file' ] }
/>
) }

Expand Down

0 comments on commit ef75e14

Please sign in to comment.