-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(button): add "featured" variant #1857
base: develop
Are you sure you want to change the base?
Changes from all commits
da7f7b9
97db627
501ba5e
9eb1543
b1180a4
27e7091
0907245
ec560b5
838e25a
4d85e34
f90f2a7
6c2242d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
<ol class="stacks-list"> | ||
<li><a href="#base">Base</a></li> | ||
<li><a href="#danger">Danger</a></li> | ||
<li><a href="#featured">Featured</a></li> | ||
<li><a href="#muted">Muted</a></li> | ||
</ol> | ||
<p class="stacks-copy">Each style is explained below, detailing how and where to use these styles.</p> | ||
|
@@ -119,6 +120,61 @@ | |
</div> | ||
</div> | ||
|
||
|
||
{% header "h3", "Featured" %} | ||
<!-- TODO add featured button description --> | ||
<p class="stacks-copy">Featured buttons are…</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CGuindon Here's where the description for the "featured" buttons would go. Feel free to make a commit or pass a description along to me and I'll plug it in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't push to Stacks so here you go — let me know what you think. I looked at the other buttons and the color purple description in the color fundamentals:
|
||
|
||
<div class="stacks-preview"> | ||
{% highlight html %} | ||
<button class="s-btn s-btn__featured" type="button">…</button> | ||
<button class="s-btn s-btn__outlined s-btn__featured" type="button">…</button> | ||
<button class="s-btn s-btn__filled s-btn__featured" type="button">…</button> | ||
{% endhighlight %} | ||
<div class="stacks-preview--example"> | ||
<div class="overflow-x-auto"> | ||
<table class="wmn5 s-table s-table__bx-simple"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Type</th> | ||
<th scope="col" class="s-table--cell4">Class</th> | ||
<th scope="col" class="ta-center">Default State</th> | ||
<th scope="col" class="ta-center">Selected State</th> | ||
<th scope="col" class="ta-center">Disabled State</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for btn in buttons.featured %} | ||
{% assign types = btn.classes %} | ||
{% for class in types %} | ||
<tr> | ||
<th scope="row" class="va-middle"> | ||
{{ class.title }} | ||
</th> | ||
<td class="va-middle"> | ||
<div class="d-flex g4 fw-wrap"> | ||
<code class="flex--item stacks-code">.s-btn</code> | ||
{% if btn.class != nil %} | ||
<code class="flex--item stacks-code">.{{ btn.class }}</code> | ||
{% endif %} | ||
{% if class.class != nil %} | ||
<code class="flex--item stacks-code">.{{ class.class }}</code> | ||
{% endif %} | ||
</div> | ||
</td> | ||
<td class="va-middle ta-center px4"><button class="ws-nowrap s-btn {{ btn.class }} {{ class.class }}" type="button">Ask question</button></td> | ||
<td class="va-middle ta-center px4"><button class="ws-nowrap s-btn {{ btn.class }} {{ class.class }} is-selected" type="button" aria-pressed="true">Ask question</button></td> | ||
<td class="va-middle ta-center px4"><button class="ws-nowrap s-btn {{ btn.class }} {{ class.class }}" type="button" disabled>Ask question</button></td> | ||
</tr> | ||
{% endfor %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
{% header "h3", "Muted" %} | ||
<p class="stacks-copy">Muted buttons are a secondary button style, a grayscale visual treatment. Used in layouts for the least important items or currently inactive actions.</p> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with
featured
for this variant name.I figured it's best to avoid coupling naming with visual that could change (
purple
) andnew
felt too restrictive since I could see this button being used just to grab some attention generally.featured
felt like the best fit but I'm glad to change it if you feel differently @CGuindon.