Skip to content

feat(): Buttons #81

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

Merged
merged 6 commits into from
Oct 1, 2019
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
2 changes: 1 addition & 1 deletion src/_includes/components/alert.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div markdown="div" class="alert alert--{{ include.type }}" role="alert">
<div class="alert alert--{{ include.type }}" role="alert">
{% include_relative assets/icons/alerts/{{ include.type }}.svg %}
{{ include.content }}
</div>
3 changes: 3 additions & 0 deletions src/_includes/components/button-fill.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button button-fill {% if include.size %}button--{{ include.size }}{% endif %} {% if include.variant %}button-fill--{{ include.variant }}{% endif %} flex">
{{ include.text }}
</a>
3 changes: 3 additions & 0 deletions src/_includes/components/button-hollow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button button-hollow {% if include.size %}button--{{ include.size }}{% endif %} flex">
{{ include.text }}
</a>
3 changes: 3 additions & 0 deletions src/_includes/components/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button {% if include.size %}button--{{ include.size }}{% endif %} flex">
{{ include.text }}
</a>
20 changes: 20 additions & 0 deletions src/_sass/components/_button-fill.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.button-fill {
border-radius: 4px;
background-color: color(primary);
color: color(white);
transition: box-shadow 0.3s;

&:hover {
box-shadow: 0 4px 8px 0 rgba(82, 189, 149, 0.08);
}

&--white {
background-color: color(white);
color: color(gray);
transition: 0.3s color;

&:hover {
color: color(success);
}
}
}
4 changes: 4 additions & 0 deletions src/_sass/components/_button-hollow.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.button-hollow {
color: color(secondary);
padding: 12px 0;
}
24 changes: 24 additions & 0 deletions src/_sass/components/_button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.button {
font-size: 16px;
font-weight: 500;
line-height: 1.5;
text-align: center;
padding: 12px 15px;
display: inline-block;
text-decoration: none;

&:hover {
text-decoration: none;
}

&--small {
font-size: 14px;
font-weight: 500;
line-height: 1.14;
padding: 9px 8px;
}

&--large {
padding: 12px 23px;
}
}
3 changes: 3 additions & 0 deletions src/_sass/segment.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
@import "components/note";
@import "components/button-link";
@import "components/alert";
@import "components/button";
@import "components/button-fill";
@import "components/button-hollow";
@import "components/markdown";
@import "components/list-steps";
@import "components/input";
Expand Down
3 changes: 3 additions & 0 deletions src/assets/icons/symbols/thumb-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/symbols/thumb-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion src/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ layout: page
{% include components/alert.html type="warning" content="This is my sample note." %}
{% include components/alert.html type="error" content="This is my sample note." %}

{% include components/button.html text="Sign up" href="https://segment.com" %}
{% include components/button-fill.html size="large" text="Yes" href="https://segment.com" %}
{% include components/button.html size="large" text="Yes" href="https://segment.com" %}
{% include components/button-fill.html size="small" text="Sign up" href="https://segment.com" %}
{% include components/button-fill.html size="small" variant="white" text="Yes" href="https://segment.com" %}
{% include components/button-hollow.html size="small" text="Log in" href="https://segment.com" %}

{% include components/list-steps.html number="1" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}
{% include components/list-steps.html number="2" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}
{% include components/list-steps.html number="3" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}
{% include components/list-steps.html number="3" heading="Totally new here?" content="Not sure what to track or why? Check out Segment’s Analytics Academy to learn more about the wide world of analytics, including the what and why and some stories about beautiful stacks." %}