Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
title: 'bar',
onClick() {
console.log('bar');
},
},
]}
>
This is the warning message
;
//
// Utils
// ============================================================================
// $ExpectType string[]
be.transformStyles(STYLES);
// $ExpectType string[]
be.transformStyles(STYLES, '.foobar');
//
// Store
// ============================================================================
// $ExpectType void
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE);
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4);
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4, 'foo');
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4, 'foo', false);
// $ExpectType IterableIterator
dispatch('core/block-editor').insertBlocks([BLOCK_INSTANCE]);
},
},
]}
>
This is the warning message
;
//
// Utils
// ============================================================================
// $ExpectType string[]
be.transformStyles(STYLES);
// $ExpectType string[]
be.transformStyles(STYLES, '.foobar');
//
// Store
// ============================================================================
// $ExpectType void
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE);
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4);
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4, 'foo');
dispatch('core/block-editor').insertBlock(BLOCK_INSTANCE, 4, 'foo', false);
// $ExpectType IterableIterator
dispatch('core/block-editor').insertBlocks([BLOCK_INSTANCE]);
dispatch('core/block-editor').insertBlocks([BLOCK_INSTANCE], 5);
dispatch('core/block-editor').insertBlocks([BLOCK_INSTANCE], 5, 'foo');
dispatch('core/block-editor').insertBlocks([BLOCK_INSTANCE], 5, 'foo', false);
const { styles } = this.props;
// Default styles used to unset some of the styles
// that might be inherited from the editor style.
const defaultStyles = `
html,body,:root {
margin: 0 !important;
padding: 0 !important;
overflow: visible !important;
min-height: auto !important;
}
`;
this.setState( { styles: [
defaultStyles,
...transformStyles( styles ),
] } );
}
componentDidMount() {
this.props.updateEditorSettings( this.props.settings );
if ( ! this.props.settings.styles ) {
return;
}
const updatedStyles = transformStyles( this.props.settings.styles, '.editor-styles-wrapper' );
map( updatedStyles, ( updatedCSS ) => {
if ( updatedCSS ) {
const node = document.createElement( 'style' );
node.innerHTML = updatedCSS;
document.body.appendChild( node );
}
} );
}