From be816c3a542b1eaa45d05b64879cf4f63d47fc1f Mon Sep 17 00:00:00 2001 From: Matthew Kevins Date: Tue, 28 Apr 2020 15:17:05 +1000 Subject: [PATCH] Wrap button blocks with buttons blocks in mobile page templates --- .../templates/about.native.js | 15 ++++++++---- .../templates/blog.native.js | 15 ++++++++---- .../templates/portfolio.native.js | 23 +++++++++++-------- .../templates/services.native.js | 15 ++++++++---- .../templates/team.native.js | 21 ++++++++++------- 5 files changed, 57 insertions(+), 32 deletions(-) diff --git a/packages/block-editor/src/components/page-template-picker/templates/about.native.js b/packages/block-editor/src/components/page-template-picker/templates/about.native.js index 2cef23413e816..5ce980e322b6f 100644 --- a/packages/block-editor/src/components/page-template-picker/templates/about.native.js +++ b/packages/block-editor/src/components/page-template-picker/templates/about.native.js @@ -94,11 +94,16 @@ const About = { }, }, { - name: 'core/button', - attributes: { - // translators: sample content for "About" page template - text: __( 'Get in Touch' ), - }, + name: 'core/buttons', + innerBlocks: [ + { + name: 'core/button', + attributes: { + // translators: sample content for "About" page template + text: __( 'Get in Touch' ), + }, + }, + ], }, { name: 'core/spacer', diff --git a/packages/block-editor/src/components/page-template-picker/templates/blog.native.js b/packages/block-editor/src/components/page-template-picker/templates/blog.native.js index 3ebd6173f164c..82c111f086ccf 100644 --- a/packages/block-editor/src/components/page-template-picker/templates/blog.native.js +++ b/packages/block-editor/src/components/page-template-picker/templates/blog.native.js @@ -60,11 +60,16 @@ const Blog = { }, }, { - name: 'core/button', - attributes: { - // translators: sample content for "Blog" page template - text: __( 'Subscribe' ), - }, + name: 'core/buttons', + innerBlocks: [ + { + name: 'core/button', + attributes: { + // translators: sample content for "Blog" page template + text: __( 'Subscribe' ), + }, + }, + ], }, { name: 'core/spacer', diff --git a/packages/block-editor/src/components/page-template-picker/templates/portfolio.native.js b/packages/block-editor/src/components/page-template-picker/templates/portfolio.native.js index 30e1f1b96fbc0..6bd1dedeafef3 100644 --- a/packages/block-editor/src/components/page-template-picker/templates/portfolio.native.js +++ b/packages/block-editor/src/components/page-template-picker/templates/portfolio.native.js @@ -175,15 +175,20 @@ const Portfolio = { }, }, { - name: 'core/button', - attributes: { - url: '', - // translators: sample content for "Portfolio" page template - text: __( 'Get in touch!' ), - linkTarget: '', - rel: '', - className: 'aligncenter', - }, + name: 'core/buttons', + innerBlocks: [ + { + name: 'core/button', + attributes: { + url: '', + // translators: sample content for "Portfolio" page template + text: __( 'Get in touch!' ), + linkTarget: '', + rel: '', + className: 'aligncenter', + }, + }, + ], }, { name: 'core/spacer', diff --git a/packages/block-editor/src/components/page-template-picker/templates/services.native.js b/packages/block-editor/src/components/page-template-picker/templates/services.native.js index 3aed391834817..93a7656fcb503 100644 --- a/packages/block-editor/src/components/page-template-picker/templates/services.native.js +++ b/packages/block-editor/src/components/page-template-picker/templates/services.native.js @@ -139,11 +139,16 @@ const Services = { }, }, { - name: 'core/button', - attributes: { - // translators: sample content for "Services" page template - text: __( 'Get in Touch' ), - }, + name: 'core/buttons', + innerBlocks: [ + { + name: 'core/button', + attributes: { + // translators: sample content for "Services" page template + text: __( 'Get in Touch' ), + }, + }, + ], }, { name: 'core/spacer', diff --git a/packages/block-editor/src/components/page-template-picker/templates/team.native.js b/packages/block-editor/src/components/page-template-picker/templates/team.native.js index 2b702931b4ba7..e5de613a1e065 100644 --- a/packages/block-editor/src/components/page-template-picker/templates/team.native.js +++ b/packages/block-editor/src/components/page-template-picker/templates/team.native.js @@ -225,14 +225,19 @@ const Team = { }, }, { - name: 'core/button', - attributes: { - url: '', - // translators: sample content for "Team" page template - text: __( 'Get in Touch!' ), - borderRadius: 4, - className: 'aligncenter', - }, + name: 'core/buttons', + innerBlocks: [ + { + name: 'core/button', + attributes: { + url: '', + // translators: sample content for "Team" page template + text: __( 'Get in Touch!' ), + borderRadius: 4, + className: 'aligncenter', + }, + }, + ], }, { name: 'core/spacer',