chore: 🤖 Add subtitle to rose/card/link component
This commit is contained in:
5 files changed
+21
-1
No files matched your search
@@ -31,7 +31,10 @@
|
||||
@include type.type(m, semibold);
|
||||
color: var(--stark);
|
||||
margin: 0;
|
||||
padding-bottom: sizing.rems(xs);
|
||||
}
|
||||
|
||||
.rose-card-link-subtitle {
|
||||
color: var(--ui-gray);
|
||||
}
|
||||
|
||||
.rose-card-link-description {
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
<h2 class="rose-card-link-title">{{@title}}</h2>
|
||||
{{/if}}
|
||||
|
||||
{{#if @subtitle}}
|
||||
<p class="rose-card-link-subtitle">{{@subtitle}}</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if @description}}
|
||||
<p class="rose-card-link-description">{{@description}}</p>
|
||||
{{/if}}
|
||||
|
||||
@@ -184,3 +184,4 @@ Dummy app index template
|
||||
|
||||
<Rose::Card::Link @title="I'm a card" />
|
||||
<Rose::Card::Link @title="I'm a card" @description="I'm a description" />
|
||||
<Rose::Card::Link @title="I'm a card" @description="I'm a description" @subtitle="I'm a subtitle"/>
|
||||
@@ -10,6 +10,9 @@ module('Integration | Component | rose/card/link', function (hooks) {
|
||||
await render(hbs`<Rose::Card::Link />`);
|
||||
assert.ok(find('article'));
|
||||
assert.ok(find('.rose-card-link'));
|
||||
assert.notOk(find('.rose-card-link-title'));
|
||||
assert.notOk(find('.rose-card-link-subtitle'));
|
||||
assert.notOk(find('.rose-card-link-description'));
|
||||
});
|
||||
|
||||
test('it renders with @title', async function (assert) {
|
||||
@@ -21,6 +24,14 @@ module('Integration | Component | rose/card/link', function (hooks) {
|
||||
);
|
||||
});
|
||||
|
||||
test('it renders with @subtitle', async function (assert) {
|
||||
await render(hbs`<Rose::Card::Link @subtitle="card subtitle" />`);
|
||||
assert.equal(
|
||||
find('.rose-card-link-subtitle').textContent.trim(),
|
||||
'card subtitle'
|
||||
);
|
||||
});
|
||||
|
||||
test('it renders with @description', async function (assert) {
|
||||
await render(hbs`<Rose::Card::Link @description="card description" />`);
|
||||
assert.equal(
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
{{#each @model as |project|}}
|
||||
<li class="project">
|
||||
<Rose::Card::Link @title={{project.name}}
|
||||
@subtitle={{project.id}}
|
||||
@description={{project.description}}
|
||||
@route="orgs.org.projects.project"
|
||||
@model={{project}}
|
||||
|
||||
Reference in new issue
Block a user