From 1310b0b17eab49f5a9e48a81d1b4192f57213c6c Mon Sep 17 00:00:00 2001 From: Nikan Dalvand Date: Mon, 22 Jul 2019 12:50:26 +0430 Subject: [PATCH] Standardized button component and implemented focus,active,hover styles --- src/renderer/components/Button.vue | 46 ++++++++++++++++++------ src/renderer/layouts/DockableSidebar.vue | 22 +++++++----- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/renderer/components/Button.vue b/src/renderer/components/Button.vue index 287458e..2631198 100644 --- a/src/renderer/components/Button.vue +++ b/src/renderer/components/Button.vue @@ -1,16 +1,19 @@ @@ -22,36 +25,57 @@ export default { padding: .5rem 1rem text-transform: capitalize border-radius: .375rem - + transition: background-color 200ms + box-sizing: border-box + overflow: hidden + outline: unset &--contained background-color: #336cfb color: white font-weight: 600 - align-self: flex-starts - - #btn__icon + &:hover + background-color: lighten(#336cfb,5) + &:focus,&:active + background-color: darken(#336cfb,5) + svg width: 14px height: 14px fill: white + transition: fill 200ms &--flat color: grey transition: all .2s ease-in-out - &:hover + svg + fill: gray + &:hover + background-color: rgba(0,0,0,0.05) + &:focus,&:active background-color: rgba(0,0,0,.15) &--raised background-color: #336cfb color: white font-weight: 600 - box-shadow: 0 .6rem .6rem rgba(#336cfb , .5) - + box-shadow: 0 .3rem .7rem rgba(#336cfb , .5) + &:hover + background-color: lighten(#336cfb,5) + &:focus,&:active + background-color: darken(#336cfb,5) &--outlined background-color: white border: 1px solid #336cfb - transition: all 0.2s ease-in-out + svg + fill: #336cfb + &:focus,&:active + background-color: darken(#336cfb,5) + color: white + svg + fill: white &:hover background-color: #336cfb color: white + svg + fill: white diff --git a/src/renderer/layouts/DockableSidebar.vue b/src/renderer/layouts/DockableSidebar.vue index 8f8c208..b1c5a75 100644 --- a/src/renderer/layouts/DockableSidebar.vue +++ b/src/renderer/layouts/DockableSidebar.vue @@ -77,15 +77,17 @@ -
@@ -174,6 +176,8 @@ section.sidebar flex-direction: column overflow-y: auto transition: width 300ms,transform 300ms,padding 500ms + .playlist-button + align-self: flex-start .icon width: 18px height: auto