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