-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: atoms-button-compound data restructure
- Loading branch information
Showing
11 changed files
with
23 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,4 +1,6 @@ | ||
{{#button}} | ||
<button class="hoo-buttonaction"> | ||
<span class="hoo-button-icon" aria-hidden="true"> {{> atoms-icon iconname=icon }} </span> | ||
<span class="hoo-button-icon" aria-hidden="true"> {{> atoms-icon }} </span> | ||
<span class="hoo-button-label"> {{label}} </span> | ||
</button> | ||
</button> | ||
{{/button}} |
This file was deleted.
Oops, something went wrong.
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,26 +1,14 @@ | ||
{{# if ddItems }} | ||
<div class="hoo-buttoncmd{{ modifier }}" aria-haspopup="true"> | ||
<button class="hoo-buttoncmd{{ modifier }}" aria-haspopup="true"> | ||
<div class="hoo-buttoncmd{{ modifier }}" {{#if contextMenu}} aria-haspopup="true" {{/if}}> | ||
<button class="hoo-buttoncmd{{ modifier }}" {{#if contextMenu}}aria-haspopup="true"{{/if}}> | ||
<span class="hoo-button-icon" aria-hidden="true"> {{> atoms-icon iconname=iconAction }} </span> | ||
<span class="hoo-button-label"> {{label}} </span> | ||
{{!-- When no drop down items are shown there is not need to show the dropdown --}} | ||
{{#if contextMenu }} | ||
<span class="hoo-button-icon hoo-buttonchevron"> {{> atoms-icon iconname=iconDown }} </span> | ||
{{/if}} | ||
</button> | ||
{{!-- When no drop down items are shown there is not need to show the dropdown --}} | ||
{{> atoms-menu-flyouts contextItems=ddItems }} | ||
</div> | ||
{{ else }} | ||
{{!-- Variant when no command bar is present --}} | ||
<div class="hoo-buttoncmd{{ modifier }}"> | ||
<button class="hoo-buttoncmd{{ modifier }}"> | ||
<span class="hoo-button-icon" aria-hidden="true"> {{> atoms-icon iconname=iconAction }} </span> | ||
<span class="hoo-button-label"> {{label}} </span> | ||
{{!-- When no drop down items are shown there is not need to show the dropdown | ||
* No Chevron | ||
--}} | ||
</button> | ||
{{!-- | ||
* No Flyout gets rendered either | ||
--}} | ||
</div> | ||
{{/ if }} | ||
{{#contextMenu}} | ||
{{> atoms-menu-flyouts }} | ||
{{/contextMenu}} | ||
</div> |
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,15 +1,5 @@ | ||
{ | ||
"iconAction": "icon-plus", | ||
"iconDown": "icon-arrow-down", | ||
"label": "New Item", | ||
"ddItems": [ | ||
{ | ||
"label": "Email message", | ||
"icon": "icon-ninjacat" | ||
}, | ||
{ | ||
"label": "Calendar Event", | ||
"icon": "icon-minus" | ||
} | ||
] | ||
"label": "New Item" | ||
} |
8 changes: 5 additions & 3 deletions
8
htwoo-core/src/_patterns/atoms/buttons/button-compound-primary.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,4 +1,6 @@ | ||
<button class="{{ classname }}"> | ||
{{#button}} | ||
<button class="hoo-buttoncomp-primary"> | ||
<span class="hoo-buttoncomp-label">{{ label }}</span> | ||
<span class="hoo-buttoncomp-desc">{{ desc }}</span> | ||
</button> | ||
<span class="hoo-buttoncomp-desc">{{ description }}</span> | ||
</button> | ||
{{/button}} |
5 changes: 0 additions & 5 deletions
5
htwoo-core/src/_patterns/atoms/buttons/button-compound-primary.json
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
htwoo-core/src/_patterns/atoms/buttons/button-compound-standard.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,4 +1,6 @@ | ||
<button class="{{ classname }}"> | ||
{{#button}} | ||
<button class="hoo-buttoncomp"> | ||
<span class="hoo-buttoncomp-label">{{ label }}</span> | ||
<span class="hoo-buttoncomp-desc">{{ desc }}</div> | ||
<span class="hoo-buttoncomp-desc">{{ description }}</div> | ||
</button> | ||
{{/button}} |
5 changes: 0 additions & 5 deletions
5
htwoo-core/src/_patterns/atoms/buttons/button-compound-standard.json
This file was deleted.
Oops, something went wrong.