gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/clipboard_button.vue

33 lines
550 B
Vue
Raw Normal View History

2017-09-15 13:10:08 +00:00
<script>
/**
* Falls back to the code used in `copy_to_clipboard.js`
*/
2017-09-15 16:05:46 +00:00
2017-09-15 13:10:08 +00:00
export default {
name: 'clipboardButton',
props: {
text: {
type: String,
required: true,
},
title: {
type: String,
required: true,
},
},
};
</script>
<template>
<button
type="button"
class="btn btn-transparent btn-clipboard"
:data-title="title"
:data-clipboard-text="text">
2017-09-15 13:10:08 +00:00
<i
aria-hidden="true"
class="fa fa-clipboard">
</i>
</button>
</template>