From 7d392179d61392a25e2b948b9268fc0c89ec2248 Mon Sep 17 00:00:00 2001
From: Sebastien Curt <sebastien.curt@tetras-libre.fr>
Date: Tue, 22 Feb 2022 15:03:34 +0100
Subject: [PATCH] Refactor create capsule button

---
 assets/styles/app.scss            | 19 ++++---------------
 templates/capsule/index.html.twig |  2 +-
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/assets/styles/app.scss b/assets/styles/app.scss
index bf50cae..5ae0373 100644
--- a/assets/styles/app.scss
+++ b/assets/styles/app.scss
@@ -2,6 +2,7 @@
 @import "~bootstrap/scss/bootstrap";
 @import "~bootstrap/scss/variables";
 @import "./layout/header";
+@import "~bootstrap/scss/_mixins.scss";
 
 body {
   height:100%;
@@ -46,21 +47,9 @@ button[type=submit]{
   opacity: 1;
 }
 
-#btn-orange {
-  background: #FA772E;
-  color: white;
-  border: none;
-  border-radius: 3px;
-  line-height: 1.5;
-  font-size: 1rem;
-  padding: .5rem 1rem;
-  text-align: center;
-  text-transform: uppercase;
-  box-shadow: 0 -2px 0 #f05b2b inset;
-}
-
-#btn-orange:hover {
-  background: #f05b2b;
+$orange-button-bt: #FA772E;
+.btn-orange {
+  @include button-variant($orange-button-bt, $orange-button-bt, white, #f05b2b, #f05b2b);
 }
 
 #user-block {
diff --git a/templates/capsule/index.html.twig b/templates/capsule/index.html.twig
index c70d9a2..4a029c3 100644
--- a/templates/capsule/index.html.twig
+++ b/templates/capsule/index.html.twig
@@ -25,7 +25,7 @@
             {% endif %}
 
             <form class="d-flex mb-4 mb-lg-0">
-                <button id="btn-orange" formaction="/create">
+                <button class="btn btn-orange text-uppercase" formaction="/create">
                     + {{ 'capsule.create_capsule'|trans }}
                 </button>
             </form>
-- 
GitLab