| Yoshie Muranaka | 0e893f0 | 2020-02-18 13:39:45 -0800 | [diff] [blame^] | 1 | <template> |
| 2 | <b-button | ||||
| 3 | :aria-label="title ? title : value" | ||||
| 4 | :title="title" | ||||
| 5 | variant="link" | ||||
| 6 | :disabled="!enabled" | ||||
| 7 | @click="$emit('click:tableAction', value)" | ||||
| 8 | > | ||||
| 9 | <slot name="icon"> | ||||
| 10 | {{ value }} | ||||
| 11 | </slot> | ||||
| 12 | </b-button> | ||||
| 13 | </template> | ||||
| 14 | |||||
| 15 | <script> | ||||
| 16 | export default { | ||||
| 17 | name: 'TableRowAction', | ||||
| 18 | props: { | ||||
| 19 | value: { | ||||
| 20 | type: String, | ||||
| 21 | required: true | ||||
| 22 | }, | ||||
| 23 | enabled: { | ||||
| 24 | type: Boolean, | ||||
| 25 | default: true | ||||
| 26 | }, | ||||
| 27 | title: { | ||||
| 28 | type: String, | ||||
| 29 | default: null | ||||
| 30 | } | ||||
| 31 | } | ||||
| 32 | }; | ||||
| 33 | </script> | ||||
| 34 | |||||
| 35 | <style lang="scss" scoped> | ||||
| 36 | .btn { | ||||
| 37 | padding-top: 0; | ||||
| 38 | padding-bottom: 0; | ||||
| 39 | } | ||||
| 40 | </style> | ||||