| 1 |
<script setup lang="ts"> |
| 2 |
import { defineProps, withDefaults } from "vue"; |
| 3 |
import { copyString } from "@/utils/helpers"; |
| 4 |
import Icon from "@/components/Icon/Icon.vue"; |
| 5 |
|
| 6 |
interface Props { |
| 7 |
link: string; |
| 8 |
} |
| 9 |
|
| 10 |
withDefaults(defineProps<Props>(), {}); |
| 11 |
</script> |
| 12 |
|
| 13 |
<template> |
| 14 |
<div class="copy-field" @click="copyString(link)"> |
| 15 |
<span class="copy-field__link">{{ link }}</span> |
| 16 |
<Icon name="icon-content-copy" color="primary" /> |
| 17 |
</div> |
| 18 |
</template> |
| 19 |
|
| 20 |
<style lang="scss" scoped> |
| 21 |
.copy-field { |
| 22 |
display: flex; |
| 23 |
cursor: pointer; |
| 24 |
justify-content: space-between; |
| 25 |
padding: 12px 16px; |
| 26 |
border-radius: 8px; |
| 27 |
word-wrap: break-word; |
| 28 |
align-items: center; |
| 29 |
background: var(--gray-light); |
| 30 |
|
| 31 |
&__link { |
| 32 |
flex: 1 1 auto; |
| 33 |
color: var(--gray); |
| 34 |
overflow-wrap: anywhere; |
| 35 |
} |
| 36 |
} |
| 37 |
</style> |
| 38 |
|