|
@@ -1,12 +1,18 @@
|
|
|
<template>
|
|
|
- <button @click="$emit('click', $event)">
|
|
|
+ <button @click="$emit('click', $event)"
|
|
|
+ :class="{
|
|
|
+ error: type === 'error',
|
|
|
+ primary: type === 'primary',
|
|
|
+ secondary: type === 'secondary'
|
|
|
+ }">
|
|
|
<slot/>
|
|
|
</button>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: "button-input"
|
|
|
+ name: "button-input",
|
|
|
+ props: ['type']
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -17,4 +23,18 @@ button {
|
|
|
border-radius: 0.75rem;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
+
|
|
|
+.error {
|
|
|
+ background-color: var(--error);
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+
|
|
|
+.primary {
|
|
|
+ background-color: var(--primary);
|
|
|
+ color: white;
|
|
|
+}
|
|
|
+
|
|
|
+.secondary {
|
|
|
+ background-color: var(--secondary);
|
|
|
+}
|
|
|
</style>
|