Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: revert usage of clearable prop
  • Loading branch information
yogeshbhutkar committed Feb 3, 2025
commit 1c61404e565fa5735372812b4dc20290eea0a039
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const LabeledColorIndicator = ( { indicator, label } ) => (
);

const renderToggle =
( duotone, resetDuotone, clearable ) =>
( duotone, resetDuotone ) =>
( { onToggle, isOpen } ) => {
const toggleProps = {
onClick: onToggle,
Expand All @@ -140,7 +140,7 @@ const renderToggle =
label={ __( 'Duotone' ) }
/>
</Item>
{ clearable && duotone && (
{ duotone && (
<Button
__next40pxDefaultSize
label={ __( 'Reset' ) }
Expand All @@ -162,7 +162,6 @@ export default function FiltersPanel( {
settings,
panelId,
defaultControls = DEFAULT_CONTROLS,
clearable = false,
} ) {
const decodeValue = ( rawValue ) =>
getValueFromVariable( { settings }, '', rawValue );
Expand Down Expand Up @@ -220,11 +219,7 @@ export default function FiltersPanel( {
<Dropdown
popoverProps={ popoverProps }
className="block-editor-global-styles-filters-panel__dropdown"
renderToggle={ renderToggle(
duotone,
resetDuotone,
clearable
) }
renderToggle={ renderToggle( duotone, resetDuotone ) }
renderContent={ () => (
<DropdownContentWrapper paddingSize="small">
<MenuGroup label={ __( 'Duotone' ) }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@
top: $grid-unit;
margin: auto $grid-unit auto;
opacity: 0;
transition: opacity 0.1s ease-in-out;
@include reduce-motion("transition");
@media not (prefers-reduced-motion) {
transition: opacity 0.1s ease-in-out;
}

.block-editor-panel-duotone-settings__dropdown:hover + &,
&:focus,
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/hooks/duotone.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ function DuotonePanelPure( { style, setAttributes, name } ) {
setAttributes( { style: newStyle } );
} }
settings={ settings }
clearable
/>
</InspectorControls>
<BlockControls group="block" __experimentalShareWithChildBlocks>
Expand Down