summaryrefslogtreecommitdiff
path: root/src/components/Button.module.css
diff options
context:
space:
mode:
authorHaishan <[email protected]>2019-12-27 16:29:10 +0800
committerHaishan <[email protected]>2019-12-27 16:29:46 +0800
commit3d761f5c361426f7c5a57b4817830c768317f80b (patch)
tree127a315c8e478ef8c71a65acc9b2cf491ddd3cb3 /src/components/Button.module.css
parentaca578cb9dfdaed33f91c62ffdf3ef1a456c6a72 (diff)
refactor: add a loading state to Button
Diffstat (limited to 'src/components/Button.module.css')
-rw-r--r--src/components/Button.module.css18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/components/Button.module.css b/src/components/Button.module.css
index 809e133..719a9aa 100644
--- a/src/components/Button.module.css
+++ b/src/components/Button.module.css
@@ -2,6 +2,7 @@
-webkit-appearance: none;
outline: none;
user-select: none;
+ position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
@@ -22,25 +23,22 @@
}
font-size: 0.85em;
- padding: 5px 8px;
+ padding: 4px 7px;
@media (--breakpoint-not-small) {
font-size: 1em;
padding: 6px 12px;
}
- &.plain {
- border-radius: 100%;
- padding: 0;
- display: flex;
+ &.minimal {
border-color: transparent;
background: none;
&:focus {
border-color: var(--color-focus-blue);
}
&:hover {
+ color: #fff;
background: #387cec;
border: 1px solid #387cec;
- color: #fff;
}
}
}
@@ -51,3 +49,11 @@
align-items: center;
justify-content: center;
}
+
+.loadingContainer {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ display: inline-flex;
+}