-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Inline-banner): refactored yield (#151)
* remove htmlSafe * removed computed property * changed class name * changed name in test * changed indentations * changed backstop setup * changed yield content * refactored code * changed if/else block
- Loading branch information
1 parent
198ec6f
commit 0ce4615
Showing
3 changed files
with
21 additions
and
36 deletions.
There are no files selected for viewing
17 changes: 2 additions & 15 deletions
17
packages/@nucleus/tests/dummy/app/templates/components/nucleus-inline-banner/demo-2.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 19 additions & 21 deletions
40
packages/inline-banner/addon/templates/components/nucleus-inline-banner.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
{{#if hasBlock}} | ||
{{yield | ||
(hash | ||
close=(action "onCloseTip") | ||
) | ||
}} | ||
{{else}} | ||
<div class="nucleus-inline-banner__icon"> | ||
{{nucleus-icon name=_icon size="medium" variant=type}} | ||
</div> | ||
<div class="nucleus-inline-banner__content"> | ||
<div data-test-id="nucleus-inline-banner-title">{{title}}</div> | ||
</div> | ||
{{#if isDismissible}} | ||
<div class="nucleus-inline-banner__close"> | ||
{{nucleus-button | ||
variant="text" | ||
size="mini" | ||
icon="nucleus-cross" | ||
iconOnly=true | ||
onClick=(action "onCloseTip")}} | ||
<div class="nucleus-inline-banner__icon"> | ||
{{nucleus-icon name=_icon size="medium" variant=type}} | ||
</div> | ||
<div class="nucleus-inline-banner__content"> | ||
{{#if hasBlock}} | ||
{{yield}} | ||
{{else}} | ||
<div data-test-id="nucleus-inline-banner-title"> | ||
{{title}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
{{#if isDismissible}} | ||
<div class="nucleus-inline-banner__close"> | ||
{{nucleus-button | ||
variant="text" | ||
size="mini" | ||
icon="nucleus-cross" | ||
iconOnly=true | ||
onClick=(action "onCloseTip")}} | ||
</div> | ||
{{/if}} |
Binary file modified
BIN
+920 Bytes
(100%)
...ine-banner__it_passes_visual_regression_tests__assert0_0_document_0_webview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.