| Yoshie Muranaka | 0e893f0 | 2020-02-18 13:39:45 -0800 | [diff] [blame] | 1 | <template> | 
|  | 2 | <b-button | 
| Yoshie Muranaka | eaa0480 | 2020-02-28 13:21:27 -0800 | [diff] [blame] | 3 | :aria-label="title" | 
| Yoshie Muranaka | 0e893f0 | 2020-02-18 13:39:45 -0800 | [diff] [blame] | 4 | :title="title" | 
|  | 5 | variant="link" | 
|  | 6 | :disabled="!enabled" | 
|  | 7 | @click="$emit('click:tableAction', value)" | 
|  | 8 | > | 
|  | 9 | <slot name="icon"> | 
| Yoshie Muranaka | eaa0480 | 2020-02-28 13:21:27 -0800 | [diff] [blame] | 10 | {{ title }} | 
| Yoshie Muranaka | 0e893f0 | 2020-02-18 13:39:45 -0800 | [diff] [blame] | 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> | 
| Yoshie Muranaka | 8cc4866 | 2020-02-27 13:22:56 -0800 | [diff] [blame] | 36 | .btn.btn-link { | 
| Yoshie Muranaka | 0e893f0 | 2020-02-18 13:39:45 -0800 | [diff] [blame] | 37 | padding-top: 0; | 
|  | 38 | padding-bottom: 0; | 
|  | 39 | } | 
|  | 40 | </style> |