Skip to content

Commit

Permalink
clear → reset
Browse files Browse the repository at this point in the history
  • Loading branch information
shimotmk committed Feb 13, 2025
1 parent a459bc8 commit 6de075e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const BorderControlDropdown = (
onStyleChange,
popoverContentClassName,
popoverControlsClassName,
clearButtonClassName,
resetButtonClassName,
size,
__unstablePopoverProps,
...otherProps
Expand Down Expand Up @@ -222,7 +222,7 @@ const BorderControlDropdown = (
/>
) }
</VStack>
<div className={ clearButtonClassName }>
<div className={ resetButtonClassName }>
<Button
variant="tertiary"
onClick={ () => {
Expand All @@ -232,7 +232,7 @@ const BorderControlDropdown = (
accessibleWhenDisabled
__next40pxDefaultSize
>
{ __( 'Clear' ) }
{ __( 'Reset' ) }
</Button>
</div>
</DropdownContentWrapper>
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 clearButtonClassName = useMemo( () => {
return cx( styles.clearButton );
const resetButtonClassName = useMemo( () => {
return cx( styles.resetButton );
}, [ cx ] );

return {
Expand All @@ -94,7 +94,7 @@ export function useBorderControlDropdown(
onReset,
popoverContentClassName,
popoverControlsClassName,
clearButtonClassName,
resetButtonClassName,
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 clearButton = css`
export const resetButton = css`
display: flex;
justify-content: flex-end;
margin-top: 12px;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/border-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ describe( 'BorderControl', () => {
const solidButton = getButton( 'Solid' );
const dashedButton = getButton( 'Dashed' );
const dottedButton = getButton( 'Dotted' );
const clearButton = getButton( 'Clear' );
const resetButton = getButton( 'Reset' );

expect( customColorPicker ).toBeInTheDocument();
expect( colorSwatchButtons.length ).toEqual( colors.length );
expect( styleLabel ).toBeInTheDocument();
expect( solidButton ).toBeInTheDocument();
expect( dashedButton ).toBeInTheDocument();
expect( dottedButton ).toBeInTheDocument();
expect( clearButton ).toBeInTheDocument();
expect( resetButton ).toBeInTheDocument();
} );

it( 'should not render style options when opted out of', async () => {
Expand Down

0 comments on commit 6de075e

Please sign in to comment.