Fix: Fix button style in comment write form

This commit is contained in:
jhynsoo 2024-05-15 19:20:08 +09:00
parent 691ac86d05
commit 296f9e9983
2 changed files with 2 additions and 30 deletions

View File

@ -55,28 +55,4 @@ input {
padding: 12px; padding: 12px;
border: 1px solid var(--color-border); border: 1px solid var(--color-border);
} }
@media (hover: hover) and (pointer: fine) {
button:hover {
background-color: var(--color-background-soft);
}
button[type='submit']:hover {
background-color: var(--color-primary-soft);
}
}
button:active {
transform: scale(0.95);
background-color: var(--color-background-soft);
}
button[type='submit'] {
background-color: var(--color-primary);
color: var(--color-background);
}
button[type='submit']:active {
background-color: var(--color-primary-soft);
}
</style> </style>

View File

@ -1,7 +1,5 @@
<script setup> <script setup>
import { computed } from 'vue'; const { type, primary } = defineProps({
const { type, primary, filled } = defineProps({
type: { type: {
type: String, type: String,
default: 'button', default: 'button',
@ -11,12 +9,10 @@ const { type, primary, filled } = defineProps({
default: false, default: false,
}, },
}); });
const classes = computed(() => [primary ? 'primary' : '', filled ? 'filled' : '']);
</script> </script>
<template> <template>
<button :type="type" :class="classes"> <button :type="type" :class="primary ? 'primary' : ''">
<slot></slot> <slot></slot>
</button> </button>
</template> </template>