浏览代码

Change style on hover only if the button is active

Vishnu 4 年之前
父节点
当前提交
809b3c2a07
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 1 1
      src/components/SubmitButton.tsx
  2. 3 2
      src/pages/_app.tsx

+ 1 - 1
src/components/SubmitButton.tsx

@@ -22,7 +22,7 @@ const SubmitButton = ({
             <Spinner
             <Spinner
                 as="span"
                 as="span"
                 animation="border"
                 animation="border"
-                style={{ width: '22px', height: '22px', borderWidth: '0.20em' }}
+                style={{ width: '22px', height: '22px', borderWidth: '0.20em', color: '#2dc262' }}
             />
             />
         ) : (
         ) : (
             buttonText
             buttonText

+ 3 - 2
src/pages/_app.tsx

@@ -171,7 +171,7 @@ const GlobalStyles = createGlobalStyle`
         background: #2dc262;
         background: #2dc262;
         border-color: #29a354;
         border-color: #29a354;
     }
     }
-    .btn-success:hover ,.btn-success:focus .btn-success:active{
+    .btn-success:hover .btn-success:focus .btn-success:active {
         background-color: #29a354;
         background-color: #29a354;
         border-color: #2dc262;
         border-color: #2dc262;
     }
     }
@@ -183,8 +183,9 @@ const GlobalStyles = createGlobalStyle`
         border-color: #2dc262;
         border-color: #2dc262;
         border-width: 2px;
         border-width: 2px;
     }
     }
-    .btn-outline-success:hover {
+    .btn-outline-success:hover:enabled {
         background: #2dc262;
         background: #2dc262;
+        color: white;
     }
     }
     .btn-outline-danger, .btn-outline-secondary, .btn-outline-primary{
     .btn-outline-danger, .btn-outline-secondary, .btn-outline-primary{
         border-width: 2px;
         border-width: 2px;