<template>
  <kk-button :plain="true" @click="open1">message</kk-button>
  <kk-button :plain="true" @click="open2">success</kk-button>
  <kk-button :plain="true" @click="open3">warning</kk-button>
  <kk-button :plain="true" @click="open4">error</kk-button>
</template>

<script lang="ts" setup>
import { KkMessage, KkButton } from 'kankan-components'

const open1 = () => {
  KkMessage({
    showClose: true,
    message: 'This is a message.',
  })
}
const open2 = () => {
  KkMessage({
    showClose: true,
    message: 'Congrats, this is a success message.',
    type: 'success',
  })
}
const open3 = () => {
  KkMessage({
    showClose: true,
    message: 'Warning, this is a warning message.',
    type: 'warning',
  })
}
const open4 = () => {
  KkMessage({
    showClose: true,
    message: 'Oops, this is a error message.',
    type: 'error',
  })
}
</script>
