mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 22:59:28 +00:00
Add button component
This commit is contained in:
@@ -9,6 +9,11 @@ $secondary-colour: #46b43d;
|
||||
$primary-colour-dark: darken-colour($primary-colour);
|
||||
$secondary-colour-dark: darken-colour($secondary-colour);
|
||||
|
||||
$button-colours: (
|
||||
'primary': $primary-colour,
|
||||
'secondary': $secondary-colour
|
||||
);
|
||||
|
||||
// Breakpoints
|
||||
$breakpoints: (
|
||||
'small' : 767px,
|
||||
|
||||
35
src/stylesheets/components/_button.scss
Normal file
35
src/stylesheets/components/_button.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
.btn {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
padding: .5em 2em;
|
||||
border-radius: .5em;
|
||||
border: 2px solid;
|
||||
font-size: 1em;
|
||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
|
||||
transition: background-color .25s;
|
||||
|
||||
}
|
||||
|
||||
@each $name, $colour in $button-colours {
|
||||
.btn.btn--#{$name}.btn--full {
|
||||
background: $colour;
|
||||
border-color: $colour;
|
||||
color: white;
|
||||
|
||||
@include on-event() {
|
||||
background-color: darken-colour($colour);
|
||||
border-color: darken-colour($colour);
|
||||
}
|
||||
}
|
||||
|
||||
.btn.btn--#{$name}.btn--outline {
|
||||
background: white;
|
||||
border-color: $colour;
|
||||
color: $colour;
|
||||
|
||||
@include on-event() {
|
||||
background-color: $colour;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,3 +5,5 @@
|
||||
@import 'vendors/normalise';
|
||||
|
||||
@import 'base/typography';
|
||||
|
||||
@import 'components/button';
|
||||
|
||||
3
views/partials/button.hbs
Normal file
3
views/partials/button.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
<a class='btn btn--{{ style }} btn--{{ colour }}' href='{{ to }}'>
|
||||
{{ content }}
|
||||
</a>
|
||||
Reference in New Issue
Block a user