Skip to content

Commit

Permalink
#659 いくつかのブロックを変更
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Mar 22, 2023
1 parent ec833e3 commit 09dce1b
Show file tree
Hide file tree
Showing 22 changed files with 87 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/blocks/balloon/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export default function ( { attributes, setAttributes, className } ) {
</InspectorControls>

{ showAvatar && (
<BlockControls gruop="block">
<BlockControls group="block">
<ToolbarGroup>
<ToolbarButton
icon={ pullLeft }
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/btn-box/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -130,7 +130,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Button settings', 'snow-monkey-blocks' ) }
>
Expand Down
54 changes: 29 additions & 25 deletions src/blocks/btn/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand Down Expand Up @@ -146,6 +146,34 @@ export default function ( {
/>
</PanelColorGradientSettings>

<ToolsPanel label={ __( 'Border', 'snow-monkey-blocks' ) }>
<ToolsPanelItem
hasValue={ () =>
borderRadius !==
metadata.attributes.borderRadius.default
}
isShownByDefault
label={ __( 'Border radius', 'snow-monkey-blocks' ) }
onDeselect={ () =>
setAttributes( {
borderRadius:
metadata.attributes.borderRadius.default,
} )
}
>
<div className="smb-border-radius-control">
<BorderRadiusControl
values={ borderRadius }
onChange={ ( value ) => {
setAttributes( { borderRadius: value } );
} }
/>
</div>
</ToolsPanelItem>
</ToolsPanel>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down Expand Up @@ -206,30 +234,6 @@ export default function ( {
/>
</ToolsPanelItem>

<ToolsPanelItem
hasValue={ () =>
borderRadius !==
metadata.attributes.borderRadius.default
}
isShownByDefault
label={ __( 'Border radius', 'snow-monkey-blocks' ) }
onDeselect={ () =>
setAttributes( {
borderRadius:
metadata.attributes.borderRadius.default,
} )
}
>
<div className="smb-border-radius-control">
<BorderRadiusControl
values={ borderRadius }
onChange={ ( value ) => {
setAttributes( { borderRadius: value } );
} }
/>
</div>
</ToolsPanelItem>

<ToolsPanelItem
hasValue={ () =>
wrap !== metadata.attributes.wrap.default
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/countdown/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function ( { attributes, setAttributes, className } ) {
/>
</BlockControls>

<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -76,7 +76,9 @@ export default function ( { attributes, setAttributes, className } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/directory-structure/item/directory/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function ( { attributes, setAttributes, className, clientId } ) {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -130,7 +130,9 @@ export default function ( { attributes, setAttributes, className, clientId } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
/>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/directory-structure/item/file/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function ( { attributes, setAttributes, className } ) {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -74,7 +74,9 @@ export default function ( { attributes, setAttributes, className } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
/>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/evaluation-star/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -112,7 +112,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/faq/item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function ( { attributes, setAttributes, className, clientId } ) {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -81,7 +81,9 @@ export default function ( { attributes, setAttributes, className, clientId } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function ( { attributes, setAttributes, className, clientId } ) {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -101,7 +101,9 @@ export default function ( { attributes, setAttributes, className, clientId } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export default function ( {
</ToolsPanel>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ ! isFill && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/panels/item/horizontal/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export default function ( {
</ToolsPanel>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
<ToolbarGroup>
<ToolbarButton
icon={ pullLeft }
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/rating-box/item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function ( { attributes, setAttributes, className } ) {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -56,7 +56,9 @@ export default function ( { attributes, setAttributes, className } ) {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<ToolsPanel
label={ __( 'Block settings', 'snow-monkey-blocks' ) }
>
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/section-break-the-grid/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -384,7 +384,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<PanelBasicSettings
disableIsSlim={ true }
disableContentsMaxWidth={ true }
Expand Down Expand Up @@ -1530,7 +1532,7 @@ export default function ( {
/>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ isAvailableVerticalAlignment && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/section-side-heading/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -219,7 +219,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<PanelBasicSettings
disableIsSlim={ !! contentsMaxWidth }
disableContentsMaxWidth={ isSlim }
Expand Down Expand Up @@ -585,7 +587,7 @@ export default function ( {
/>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ isItemsAlignmentable && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/section-with-bgimage/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -347,7 +347,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<PanelBasicSettings
disableIsSlim={ !! contentsMaxWidth }
disableContentsMaxWidth={ isSlim }
Expand Down Expand Up @@ -1266,7 +1268,7 @@ export default function ( {
/>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ isItemsAlignmentable && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/section-with-bgvideo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -209,7 +209,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<PanelBasicSettings
disableIsSlim={ !! contentsMaxWidth }
disableContentsMaxWidth={ isSlim }
Expand Down Expand Up @@ -526,7 +528,7 @@ export default function ( {
/>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ isItemsAlignmentable && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/section/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default function ( {

return (
<>
<InspectorControls>
<InspectorControls group="styles">
<PanelColorGradientSettings
title={ __( 'Color', 'snow-monkey-blocks' ) }
initialOpen={ false }
Expand All @@ -213,7 +213,9 @@ export default function ( {
__experimentalHasMultipleOrigins={ true }
__experimentalIsRenderedInSidebar={ true }
></PanelColorGradientSettings>
</InspectorControls>

<InspectorControls>
<PanelBasicSettings
disableIsSlim={ !! contentsMaxWidth }
disableContentsMaxWidth={ isSlim }
Expand Down Expand Up @@ -655,7 +657,7 @@ export default function ( {
/>
</InspectorControls>

<BlockControls gruop="block">
<BlockControls group="block">
{ isItemsAlignmentable && (
<BlockVerticalAlignmentToolbar
onChange={ ( value ) =>
Expand Down
Loading

0 comments on commit 09dce1b

Please sign in to comment.