about summary refs log tree commit diff stats
path: root/src/pages/components/Button.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/components/Button.svelte')
-rw-r--r--src/pages/components/Button.svelte35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/pages/components/Button.svelte b/src/pages/components/Button.svelte
new file mode 100644
index 00000000..6ae2ba61
--- /dev/null
+++ b/src/pages/components/Button.svelte
@@ -0,0 +1,35 @@
+<button {...$$restProps} on:click {...$$props}>
+  <slot></slot>
+</button>
+
+<style>
+  button {
+    color: var(--text);
+    border: none;
+    text-decoration: none;
+    cursor: pointer;
+    font-size: 16px;
+    font-weight: bold;
+    transition-duration: 0.1s;
+    display: inline-flex;
+    align-items: center;
+    margin: 7.5px 0;
+    background-color: var(--bg-secondary);
+    border-radius: 5px;
+    padding: 10px;
+  }
+
+  button:hover:enabled {
+    color: var(--active);
+  }
+
+  button:active:enabled {
+    transform: translateY(1px);
+  }
+
+  button:disabled {
+    cursor: not-allowed;
+    opacity: 0.5;
+  }
+  
+</style>