Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace isSmall prop #53560 #53599

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/block-card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function BlockCard( { title, icon, description, blockType, className } ) {
{ minWidth: 24, padding: 0 }
}
icon={ isRTL() ? chevronRight : chevronLeft }
isSmall
size="small"
/>
) }
<BlockIcon icon={ icon } showColors />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function LinkedButton( { isLinked, ...props } ) {
<Button
{ ...props }
className="component-border-radius-control__linked-button"
isSmall
size="small"
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function ImageSizeControl( {
return (
<Button
key={ scale }
isSmall
size="small"
variant={
isCurrent ? 'primary' : undefined
}
Expand All @@ -104,7 +104,10 @@ export default function ImageSizeControl( {
);
} ) }
</ButtonGroup>
<Button isSmall onClick={ () => updateDimensions() }>
<Button
size="small"
onClick={ () => updateDimensions() }
>
{ __( 'Reset' ) }
</Button>
</HStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export default function SpacingInputControl( {
setShowCustomValueControl( ! showCustomValueControl );
} }
isPressed={ showCustomValueControl }
isSmall
size="small"
className="spacing-sizes-control__custom-toggle"
iconSize={ 24 }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default function CoverInspectorControls( {
<PanelRow>
<Button
variant="secondary"
isSmall
size="small"
className="block-library-cover__reset-button"
onClick={ onClearMedia }
>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ export default function SearchEdit( {
return (
<Button
key={ widthValue }
isSmall
size="small"
variant={
widthValue === width &&
widthUnit === '%'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const BorderBoxControlLinkedButton = (
<View className={ className }>
<Button
{ ...buttonProps }
isSmall
size="small"
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const BorderControlStylePicker = (
key={ borderStyle.value }
className={ buttonClassName }
icon={ borderStyle.icon }
isSmall
size="small"
isPressed={ borderStyle.value === value }
onClick={ () =>
onChange(
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/box-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function BoxControl( {
<Button
className="component-box-control__reset-button"
variant="secondary"
isSmall
size="small"
onClick={ handleOnReset }
disabled={ ! isDirty }
>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/box-control/linked-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function LinkedButton( {
<Button
{ ...props }
className="component-box-control__linked-button"
isSmall
size="small"
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const ColorCopyButton = ( props: ColorCopyButtonProps ) => {
}
>
<CopyButton
isSmall
size="small"
ref={ copyRef }
icon={ copy }
showTooltip={ false }
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/font-size-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const UnforwardedFontSizePicker = (
);
} }
isPressed={ showCustomValueControl }
isSmall
size="small"
/>
) }
</Header>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/navigation/menu/menu-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function NavigationMenuTitle( {

{ hasSearch && (
<Button
isSmall
size="small"
variant="tertiary"
label={ searchButtonLabel }
onClick={ () => setIsSearching( true ) }
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/number-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function UnforwardedNumberControl(
<SpinButton
className={ spinButtonClasses }
icon={ plusIcon }
isSmall
size="small"
aria-hidden="true"
aria-label={ __( 'Increment' ) }
tabIndex={ -1 }
Expand All @@ -257,7 +257,7 @@ function UnforwardedNumberControl(
<SpinButton
className={ spinButtonClasses }
icon={ resetIcon }
isSmall
size="small"
aria-hidden="true"
aria-label={ __( 'Decrement' ) }
tabIndex={ -1 }
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/palette-edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function Option< T extends Color | Gradient >( {
{ isEditing && ! canOnlyChangeValues && (
<FlexItem>
<RemoveButton
isSmall
size="small"
icon={ lineSolid }
label={ __( 'Remove color' ) }
onClick={ onRemove }
Expand Down Expand Up @@ -454,7 +454,7 @@ export function PaletteEdit( {
<PaletteActionsContainer>
{ hasElements && isEditing && (
<DoneButton
isSmall
size="small"
onClick={ () => {
setIsEditing( false );
setEditingElement( null );
Expand All @@ -465,7 +465,7 @@ export function PaletteEdit( {
) }
{ ! canOnlyChangeValues && (
<Button
isSmall
size="small"
isPressed={ isAdding }
icon={ plus }
label={
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/range-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ function UnforwardedRangeControl(
className="components-range-control__reset"
disabled={ disabled || value === undefined }
variant="secondary"
isSmall
size="small"
onClick={ handleOnReset }
>
{ __( 'Reset' ) }
Expand Down
Loading