From aa1991239a1255855791f4c5aad9ffcb6b21a2d6 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Mon, 27 Jun 2022 04:35:40 +1000
Subject: Clean up code in *Button and *Icon components

---
 src/components/SButton.vue | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 src/components/SButton.vue

(limited to 'src/components/SButton.vue')

diff --git a/src/components/SButton.vue b/src/components/SButton.vue
new file mode 100644
index 0000000..4bb827d
--- /dev/null
+++ b/src/components/SButton.vue
@@ -0,0 +1,17 @@
+<script lang="ts">
+import {defineComponent, PropType} from 'vue';
+
+export default defineComponent({
+	props: {
+		disabled: {type: Boolean, default: false},
+	},
+});
+</script>
+
+<template>
+<button :disabled="disabled"
+	class="block rounded px-4 py-2"
+	:class="{'hover:brightness-125': !disabled, 'brightness-75': disabled}">
+	<slot>?</slot>
+</button>
+</template>
-- 
cgit v1.2.3

