chore: 🤖 Restructure centered layout to remove nested component
This commit is contained in:
4 files changed
+14
-24
No files matched your search
@@ -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;
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
<div ...attributes class="rose-layout-centered">
|
||||
{{yield (hash
|
||||
body=(component "rose/anonymous" tagName="section" class="rose-layout-centered-body")
|
||||
)}}
|
||||
</div>
|
||||
<section ...attributes class="rose-layout-centered">
|
||||
{{yield}}
|
||||
</section>
|
||||
@@ -1,12 +1,8 @@
|
||||
<Rose::Layout::Centered />
|
||||
|
||||
<Rose::Layout::Centered as |layout|>
|
||||
<layout.body>
|
||||
<Rose::Message @title="Welcome to Namespaces" as |message|>
|
||||
<message.description>
|
||||
Namespaces allow you to create distinct areas with their own separate policies, mounts, tokens, and identity entities.
|
||||
</message.description>
|
||||
<message.link @route="index">Add a namespace</message.link>
|
||||
</Rose::Message>
|
||||
</layout.body>
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title="Welcome to Namespaces" as |message|>
|
||||
<message.description>
|
||||
Namespaces allow you to create distinct areas with their own separate policies, mounts, tokens, and identity entities.
|
||||
</message.description>
|
||||
<message.link @route="index">Add a namespace</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
@@ -8,6 +8,7 @@ module('Integration | Component | rose/layout/centered', function (hooks) {
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
await render(hbs`<Rose::Layout::Centered />`);
|
||||
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`<Rose::Layout::Centered as |layout|>
|
||||
<layout.body>Layout content</layout.body>
|
||||
await render(hbs`<Rose::Layout::Centered>
|
||||
Layout content
|
||||
</Rose::Layout::Centered>`);
|
||||
assert.equal(
|
||||
find('.rose-layout-centered').textContent.trim(),
|
||||
|
||||
Reference in new issue
Block a user