text.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <p>Basic text button</p>
  3. <div class="flex justify-space-between mb-4 flex-wrap gap-4">
  4. <kk-button
  5. v-for="button in buttons"
  6. :key="button.text"
  7. :type="button.type"
  8. text
  9. >{{ button.text }}</kk-button
  10. >
  11. </div>
  12. <p>Background color always on</p>
  13. <div class="flex justify-space-between mb-4 flex-wrap gap-4">
  14. <kk-button
  15. v-for="button in buttons"
  16. :key="button.text"
  17. :type="button.type"
  18. text
  19. bg
  20. >{{ button.text }}</kk-button
  21. >
  22. </div>
  23. <p>Disabled text button</p>
  24. <div class="flex justify-space-between flex-wrap gap-4">
  25. <kk-button
  26. v-for="button in buttons"
  27. :key="button.text"
  28. :type="button.type"
  29. text
  30. disabled
  31. >{{ button.text }}</kk-button
  32. >
  33. </div>
  34. </template>
  35. <script setup lang="ts">
  36. import { KkButton } from 'kankan-components'
  37. const buttons = [
  38. { type: '', text: 'plain' },
  39. { type: 'primary', text: 'primary' },
  40. { type: 'success', text: 'success' },
  41. { type: 'info', text: 'info' },
  42. { type: 'warning', text: 'warning' },
  43. { type: 'danger', text: 'danger' },
  44. ] as const
  45. </script>