Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk committed Feb 14, 2025
1 parent 0c892d1 commit 4bda128
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const BorderControlDropdown = (
onStyleChange,
popoverContentClassName,
popoverControlsClassName,
resetButtonClassName,
resetButtonWrapperClassName,
size,
__unstablePopoverProps,
...otherProps
Expand All @@ -173,7 +173,7 @@ const BorderControlDropdown = (
enableStyle
);

const showResetButton = color || ( style && style !== 'none' );
const enableResetButton = color || ( style && style !== 'none' );
const dropdownPosition = __experimentalIsRenderedInSidebar
? 'bottom left'
: undefined;
Expand Down Expand Up @@ -222,13 +222,13 @@ const BorderControlDropdown = (
/>
) }
</VStack>
<div className={ resetButtonClassName }>
<div className={ resetButtonWrapperClassName }>
<Button
variant="tertiary"
onClick={ () => {
onReset();
} }
disabled={ ! showResetButton }
disabled={ ! enableResetButton }
accessibleWhenDisabled
__next40pxDefaultSize
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export function useBorderControlDropdown(
return cx( styles.borderControlPopoverContent );
}, [ cx ] );

const resetButtonClassName = useMemo( () => {
return cx( styles.resetButton );
const resetButtonWrapperClassName = useMemo( () => {
return cx( styles.resetButtonWrapper );
}, [ cx ] );

return {
Expand All @@ -94,7 +94,7 @@ export function useBorderControlDropdown(
onReset,
popoverContentClassName,
popoverControlsClassName,
resetButtonClassName,
resetButtonWrapperClassName,
size,
__experimentalIsRenderedInSidebar,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/border-control/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const borderControlPopoverControls = css`
export const borderControlPopoverContent = css``;
export const borderColorIndicator = css``;

export const resetButton = css`
export const resetButtonWrapper = css`
display: flex;
justify-content: flex-end;
margin-top: 12px;
Expand Down

0 comments on commit 4bda128

Please sign in to comment.