Add button option to terminal component

This commit is contained in:
ines 2017-11-01 19:49:27 +01:00
parent 12954ab218
commit 9b4c38fe9f
2 changed files with 15 additions and 1 deletions

View File

@ -624,7 +624,7 @@ mixin qs(data, style)
//- Terminal-style code window
label - [string] title displayed in top bar of terminal window
mixin terminal(label)
mixin terminal(label, button_text, button_url)
.x-terminal
.x-terminal__icons: span
.u-padding-small.u-text-label.u-text-center=label
@ -632,6 +632,9 @@ mixin terminal(label)
+code.x-terminal__code
block
if button_text && button_url
+button(button_url, true, "primary", "small").x-terminal__button=button_text
//- Landing

View File

@ -6,6 +6,7 @@
padding: $border-radius
border-radius: 1em
width: 100%
position: relative
.x-terminal__icons
position: absolute
@ -39,3 +40,13 @@
width: 100%
max-width: 100%
white-space: pre-wrap
.x-terminal__button.x-terminal__button
@include position(absolute, bottom, right, 2.65rem, 2.6rem)
background: $color-dark
border-color: $color-dark
&:hover
background: darken($color-dark, 5)
border-color: darken($color-dark, 5)