Skip to content

Commit

Permalink
Remove gradientPickerDomRef prop where not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Aug 8, 2022
1 parent aa7cfdd commit 7d87cf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
11 changes: 2 additions & 9 deletions packages/components/src/custom-gradient-bar/control-points.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ function ControlPointButton( { isOpen, position, color, ...additionalProps } ) {
);
}

function GradientColorPickerDropdown( {
isRenderedInSidebar,
gradientPickerDomRef,
...props
} ) {
function GradientColorPickerDropdown( { isRenderedInSidebar, ...props } ) {
const popoverProps = useMemo( () => {
const result = {
className:
Expand All @@ -87,7 +83,7 @@ function GradientColorPickerDropdown( {
result.placement = 'top';
}
return result;
}, [ gradientPickerDomRef, isRenderedInSidebar ] );
}, [ isRenderedInSidebar ] );
return (
<CustomColorPickerDropdown
isRenderedInSidebar={ isRenderedInSidebar }
Expand Down Expand Up @@ -161,7 +157,6 @@ function ControlPoints( {
return (
ignoreMarkerPosition !== initialPosition && (
<GradientColorPickerDropdown
gradientPickerDomRef={ gradientPickerDomRef }
isRenderedInSidebar={ __experimentalIsRenderedInSidebar }
key={ index }
onClose={ onStopControlPointChange }
Expand Down Expand Up @@ -286,12 +281,10 @@ function InsertPoint( {
insertPosition,
disableAlpha,
__experimentalIsRenderedInSidebar,
gradientPickerDomRef,
} ) {
const [ alreadyInsertedPoint, setAlreadyInsertedPoint ] = useState( false );
return (
<GradientColorPickerDropdown
gradientPickerDomRef={ gradientPickerDomRef }
isRenderedInSidebar={ __experimentalIsRenderedInSidebar }
className="components-custom-gradient-picker__inserter"
onClose={ () => {
Expand Down
3 changes: 0 additions & 3 deletions packages/components/src/custom-gradient-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ export default function CustomGradientBar( {
__experimentalIsRenderedInSidebar={
__experimentalIsRenderedInSidebar
}
gradientPickerDomRef={
gradientMarkersContainerDomRef
}
disableAlpha={ disableAlpha }
insertPosition={ gradientBarState.insertPosition }
value={ controlPoints }
Expand Down

0 comments on commit 7d87cf5

Please sign in to comment.