SelectOptions.vue 602 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div class='select_options'>
  3. <button
  4. v-for='option in options'
  5. class='button button--thin_text'
  6. :class='{"button--lightblue": option.value === value}'
  7. @click='select(option.value)'
  8. >
  9. {{option.name}}
  10. </button>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'SelectOptions',
  16. props: ['value', 'options'],
  17. methods: {
  18. select (index) {
  19. this.$emit('input', index)
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang='scss' scoped>
  25. .select_options {
  26. display: inline-block;
  27. button {
  28. margin-right: 0.25rem;
  29. &:last-child {
  30. margin-right: 0;
  31. }
  32. }
  33. }
  34. </style>