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

Use next40pxDefaultSize on RangeControl components #52257

Merged
merged 10 commits into from
Jul 11, 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
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