feat: add interest button

This commit is contained in:
Ron
2025-06-03 22:04:22 +03:00
parent 0437ba6462
commit bc0fa6fbe0
10 changed files with 653 additions and 40 deletions

51
composables/useToast.ts Normal file
View File

@@ -0,0 +1,51 @@
import { ref } from 'vue'
interface Toast {
show: boolean
message: string
color: string
timeout: number
}
const toast = ref<Toast>({
show: false,
message: '',
color: 'success',
timeout: 3000
})
export const useToast = () => {
const showToast = (message: string, color: string = 'success', timeout: number = 3000) => {
toast.value = {
show: true,
message,
color,
timeout
}
}
const success = (message: string) => {
showToast(message, 'success')
}
const error = (message: string) => {
showToast(message, 'error')
}
const info = (message: string) => {
showToast(message, 'info')
}
const warning = (message: string) => {
showToast(message, 'warning')
}
return {
toast,
showToast,
success,
error,
info,
warning
}
}