+
+ { __('Colour', 'badegg') }
+
{
let slug, hex, selected = '';
@@ -127,9 +147,9 @@ registerBlockType(metadata.name, {
} }
/>
- { 'background_colour' in attributes && attributes.background_colour ? (
+ { 'background_colour' in attributes && attributes.background_colour && ![0, '0', 'white', 'black'].includes(attributes.background_colour) ? (
setAttributes({ background_tint: value }) }
@@ -138,6 +158,57 @@ registerBlockType(metadata.name, {
/>
) : null }
+ { background_image != 0 && (
+ <>
+
+ setAttributes({ background_opacity: value }) }
+ min={ 5 }
+ max={ 100 }
+ />
+ >
+ )}
+
+
+
+ {
+ setAttributes({
+ background_image: media.id,
+ background_url: media.url,
+ });
+ }}
+ allowedTypes={ ['image'] }
+ value={ background_image }
+ render={ ({ open }) => (
+
+ )}
+ />
+
+
+ { background_image != 0 && (
+
+ )}
+
+