Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<span ...attributes>✨</span>
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{{#if @status.iconComponent}}
<@status.iconComponent @status={{@status}} @tooltipPos={{@tooltipPos}} />
<@status.iconComponent
@status={{@status}}
@tooltipPos={{@tooltipPos}}
class="uk-text-{{@status.color}}"
{{uk-tooltip @status.label pos=@tooltipPos}}
/>
{{else}}
<UkIcon
@icon={{@status.icon}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module("Integration | Component | cd-inquiry-status-icon", function (hooks) {
// eslint-disable-next-line ember/no-empty-glimmer-component-classes
class CustomIconComponent extends Component {}
setComponentTemplate(
hbs`<span class="custom-icon">✨</span>`,
hbs`<span class="custom-icon" ...attributes>✨</span>`,
CustomIconComponent,
);

Expand All @@ -71,5 +71,13 @@ module("Integration | Component | cd-inquiry-status-icon", function (hooks) {

assert.dom("[uk-icon]").doesNotExist();
assert.dom(".custom-icon").hasText("✨");

// color and tooltip are applied via `...attributes` of the custom component
assert.dom(".custom-icon").hasClass("uk-text-success");
assert.tooltipHasText(this.element, ".custom-icon", "Custom!");
assert.deepEqual(
UIkit.tooltip(this.element.querySelector(".custom-icon")).pos,
["top", "center"], // UIkit adds "center" automatically
);
});
});
Loading