Skip to content

Commit

Permalink
Change icon for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
HardeepAsrani committed Jul 23, 2024
1 parent 343d5b1 commit 0350644
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions src/blocks/plugins/dynamic-content/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ o-dynamic-link {
cursor: pointer;
}

.components-toolbar {
.o-dynamic-button {
opacity: 1;

&.is-pressed {
&::before {
background: rgba(237, 111, 87, 0.1);
}
}

svg {
fill: #ED6F57;
}
}
}

.wp-block.is-selected o-dynamic,
.wp-block:not(.is-selected) o-dynamic:not([data-preview]),
.wp-block:not(.is-selected) o-dynamic[data-preview=""] {
Expand Down
5 changes: 3 additions & 2 deletions src/blocks/plugins/dynamic-content/link/edit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies.
*/
import { globe } from '@wordpress/icons';
import { link } from '@wordpress/icons';

/**
* WordPress dependencies.
Expand Down Expand Up @@ -99,11 +99,12 @@ const Edit = ({
<BlockControls>
<ToolbarGroup>
<ToolbarButton
icon={ globe }
icon={ link }
title={ __( 'Dynamic Link', 'otter-blocks' ) }
onClick={ () => setOpen( true ) }
isDisabled={ isActive }
isActive={ isActive }
className="o-dynamic-button"
/>
</ToolbarGroup>
</BlockControls>
Expand Down
1 change: 1 addition & 0 deletions src/blocks/plugins/dynamic-content/value/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const Edit = ({
onClick={ () => setOpen( true ) }
isDisabled={ isActive }
isActive={ isActive }
className="o-dynamic-button"
/>
</ToolbarGroup>
</BlockControls>
Expand Down

0 comments on commit 0350644

Please sign in to comment.