Skip to content

Commit

Permalink
Use next40pxDefaultSize on RangeControl components (#52257)
Browse files Browse the repository at this point in the history
* Use next40pxDefaultSize on gallery RangeControl

* core/avatar

* core/columns

* core/file

* core/comment-author-avatar

* latest/query/rss

* rss

* site-logo

* tag-cloud

* text-columns
  • Loading branch information
richtabor committed Jul 11, 2023
1 parent b65f528 commit 83f3fbc
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/block-library/src/avatar/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const AvatarInspectorControls = ( {
<PanelBody title={ __( 'Settings' ) }>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Image size' ) }
onChange={ ( newSize ) =>
setAttributes( {
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/columns/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ function ColumnsEditContainer( {
<>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Columns' ) }
value={ count }
onChange={ ( value ) =>
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/comment-author-avatar/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function Edit( {
<PanelBody title={ __( 'Avatar Settings' ) }>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Image size' ) }
onChange={ ( newWidth ) =>
setAttributes( {
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/file/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default function FileBlockInspector( {
{ displayPreview && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Height in pixels' ) }
min={ MIN_PREVIEW_HEIGHT }
max={ Math.max(
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ function GalleryEdit( props ) {
max={ Math.min( MAX_COLUMNS, images.length ) }
{ ...MOBILE_CONTROL_PROPS_RANGE_CONTROL }
required
size="__unstable-large"
__next40pxDefaultSize
/>
) }
<ToggleControl
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/latest-comments/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default function LatestComments( { attributes, setAttributes } ) {
/>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Number of comments' ) }
value={ commentsToShow }
onChange={ ( value ) =>
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/latest-posts/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
displayPostContentRadio === 'excerpt' && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Max number of words' ) }
value={ excerptLength }
onChange={ ( value ) =>
Expand Down Expand Up @@ -359,6 +360,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
{ postLayout === 'grid' && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Columns' ) }
value={ columns }
onChange={ ( value ) =>
Expand Down
3 changes: 3 additions & 0 deletions packages/block-library/src/rss/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default function RSSEdit( { attributes, setAttributes } ) {
<PanelBody title={ __( 'Settings' ) }>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Number of items' ) }
value={ itemsToShow }
onChange={ ( value ) =>
Expand Down Expand Up @@ -146,6 +147,7 @@ export default function RSSEdit( { attributes, setAttributes } ) {
{ displayExcerpt && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Max number of words in excerpt' ) }
value={ excerptLength }
onChange={ ( value ) =>
Expand All @@ -159,6 +161,7 @@ export default function RSSEdit( { attributes, setAttributes } ) {
{ blockLayout === 'grid' && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Columns' ) }
value={ columns }
onChange={ ( value ) =>
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ const SiteLogo = ( {
<PanelBody title={ __( 'Settings' ) }>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Image width' ) }
onChange={ ( newWidth ) =>
setAttributes( { width: newWidth } )
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/tag-cloud/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) {
/>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Number of tags' ) }
value={ numberOfTags }
onChange={ ( value ) =>
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/text-columns/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function TextColumnsEdit( { attributes, setAttributes } ) {
<PanelBody>
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Columns' ) }
value={ columns }
onChange={ ( value ) =>
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/query-controls/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const QueryControls = memo(
) }
{ onNumberOfItemsChange && (
<RangeControl
__next40pxDefaultSize
label={ __( 'Number of items' ) }
value={ numberOfItems }
onChange={ onNumberOfItemsChange }
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/query-controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export function QueryControls( {
onNumberOfItemsChange && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize
key="query-controls-range-control"
label={ __( 'Number of items' ) }
value={ numberOfItems }
Expand Down

0 comments on commit 83f3fbc

Please sign in to comment.