diff --git a/assets/editor/index.scss b/assets/editor/index.scss index 7c586044..6ec8edc5 100644 --- a/assets/editor/index.scss +++ b/assets/editor/index.scss @@ -370,10 +370,17 @@ display: flex; align-items: center; justify-content: center; + background-color: rgba(255, 255, 255, 0.5); + backdrop-filter: blur(2px); width: 100%; height: 100%; opacity: 0; transition: 0.15s opacity; + + > .components-button { + background-color: #fff; + color: #000; + } } &:hover .lzb-gutenberg-gallery-button, @@ -381,13 +388,30 @@ opacity: 1; } + .lzb-gutenberg-gallery-button-edit:hover, + .lzb-gutenberg-gallery-button-edit:focus { + color: #2279ea; + } + + .lzb-gutenberg-gallery-button-remove { + &:hover, + &:focus { + color: #ea2c22; + } + + svg { + width: 1em; + height: 1em; + fill: none; + } + } + .lzb-gutenberg-image-item, .lzb-gutenberg-gallery-item { position: relative; display: block; background-color: #e6e6e6; border-radius: 3px; - transition: 0.15s opacity; &::after { display: block; @@ -432,11 +456,6 @@ width: 30%; margin: 0 auto; } - - &:hover .lzb-gutenberg-gallery-item, - &:hover .lzb-gutenberg-image-item { - opacity: 0.6; - } } // File control diff --git a/controls/gallery/gallery-control.js b/controls/gallery/gallery-control.js index 714e34e5..fac226b3 100644 --- a/controls/gallery/gallery-control.js +++ b/controls/gallery/gallery-control.js @@ -2,7 +2,13 @@ * WordPress dependencies. */ import { __ } from '@wordpress/i18n'; -import { Button, DropZone, withNotices } from '@wordpress/components'; +import { + Button, + ButtonGroup, + Tooltip, + DropZone, + withNotices, +} from '@wordpress/components'; import { MediaPlaceholder, MediaUpload } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; @@ -121,11 +127,61 @@ function GalleryControl(props) { }); }} /> -
- -
+ + + + {value.map((img) => (