CheckboxButton.vue 342 B

123456789101112131415161718192021
  1. <template>
  2. <Button
  3. :checked="checked"
  4. :disabled="disabled"
  5. type="checkbox"
  6. >
  7. <slot></slot>
  8. </Button>
  9. </template>
  10. <script lang="ts" setup>
  11. import Button from './Button.vue'
  12. withDefaults(defineProps<{
  13. checked?: boolean
  14. disabled?: boolean
  15. }>(), {
  16. checked: false,
  17. disabled: false,
  18. })
  19. </script>