From f3016c9c6fc0054cf116f3500b7e1b7da53c6020 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Fri, 12 Jun 2020 12:03:13 -0400 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Restructure=20centered?= =?UTF-8?q?=20layout=20to=20remove=20nested=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rose/components/layout/_centered.scss | 7 +------ .../components/rose/layout/centered.hbs | 8 +++----- .../rose/tests/dummy/app/templates/index.hbs | 18 +++++++----------- .../components/rose/layout/centered-test.js | 5 +++-- 4 files changed, 14 insertions(+), 24 deletions(-) diff --git a/addons/rose/addon/styles/rose/components/layout/_centered.scss b/addons/rose/addon/styles/rose/components/layout/_centered.scss index ea8496fa9..10844c8ae 100644 --- a/addons/rose/addon/styles/rose/components/layout/_centered.scss +++ b/addons/rose/addon/styles/rose/components/layout/_centered.scss @@ -2,10 +2,5 @@ .rose-layout-centered { display: flex; - flex-direction: column; - - .rose-layout-centered-body { - margin: auto; - padding: sizing.rems(l) + sizing.rems(xxs) 0; //35px - } + justify-content: center; } diff --git a/addons/rose/addon/templates/components/rose/layout/centered.hbs b/addons/rose/addon/templates/components/rose/layout/centered.hbs index f3b2a54fb..5d32a4b3b 100644 --- a/addons/rose/addon/templates/components/rose/layout/centered.hbs +++ b/addons/rose/addon/templates/components/rose/layout/centered.hbs @@ -1,5 +1,3 @@ -
- {{yield (hash - body=(component "rose/anonymous" tagName="section" class="rose-layout-centered-body") - )}} -
+
+ {{yield}} +
diff --git a/addons/rose/tests/dummy/app/templates/index.hbs b/addons/rose/tests/dummy/app/templates/index.hbs index b6871d7a2..dde1dea20 100644 --- a/addons/rose/tests/dummy/app/templates/index.hbs +++ b/addons/rose/tests/dummy/app/templates/index.hbs @@ -1,12 +1,8 @@ - - - - - - - Namespaces allow you to create distinct areas with their own separate policies, mounts, tokens, and identity entities. - - Add a namespace - - + + + + Namespaces allow you to create distinct areas with their own separate policies, mounts, tokens, and identity entities. + + Add a namespace + diff --git a/addons/rose/tests/integration/components/rose/layout/centered-test.js b/addons/rose/tests/integration/components/rose/layout/centered-test.js index 6e74193fb..1900a1a5a 100644 --- a/addons/rose/tests/integration/components/rose/layout/centered-test.js +++ b/addons/rose/tests/integration/components/rose/layout/centered-test.js @@ -8,6 +8,7 @@ module('Integration | Component | rose/layout/centered', function (hooks) { test('it renders', async function (assert) { await render(hbs``); + assert.ok(find('section')); assert.ok(find('.rose-layout-centered')); assert.notOk(find('.rose-layout-centered-body')); }); @@ -18,8 +19,8 @@ module('Integration | Component | rose/layout/centered', function (hooks) { }); test('it renders with content', async function (assert) { - await render(hbs` - Layout content + await render(hbs` + Layout content `); assert.equal( find('.rose-layout-centered').textContent.trim(),