Radio.vue 598 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <SmartItem
  3. :label="label"
  4. :icon="
  5. value === selected ? 'radio_button_checked' : 'radio_button_unchecked'
  6. "
  7. :active="value === selected"
  8. role="radio"
  9. :aria-checked="value === selected"
  10. @click.native="$emit('change', value)"
  11. />
  12. </template>
  13. <script>
  14. import { defineComponent } from "@nuxtjs/composition-api"
  15. export default defineComponent({
  16. props: {
  17. value: {
  18. type: String,
  19. default: "",
  20. },
  21. label: {
  22. type: String,
  23. default: "",
  24. },
  25. selected: {
  26. type: String,
  27. default: "",
  28. },
  29. },
  30. })
  31. </script>