revert: remove copy to clipboard functionality
Implementation across browsers makes this too much of a hassle to implement and behave consistently, notably Safari
Refs: e29a98f
This commit is contained in:
parent
cb99059ef4
commit
de9281574d
1 changed files with 1 additions and 17 deletions
|
@ -10,10 +10,6 @@ interface Props {
|
|||
colors: ColorDict[];
|
||||
}
|
||||
|
||||
const copyToClipboard = (value: string) => {
|
||||
navigator.clipboard.writeText(value);
|
||||
};
|
||||
|
||||
defineProps<Props>();
|
||||
</script>
|
||||
|
||||
|
@ -29,13 +25,7 @@ defineProps<Props>();
|
|||
<tbody class="color-table__body">
|
||||
<tr class="color-table__row" v-for="(color, idx) in colors" :key="idx">
|
||||
<td class="color-table__cell name">{{ color.name }}</td>
|
||||
<td
|
||||
class="color-table__cell value"
|
||||
@click.prevent="copyToClipboard(color.value)"
|
||||
>
|
||||
{{ color.value }}
|
||||
<ClipboardIcon class="color-table__copy" />
|
||||
</td>
|
||||
<td class="color-table__cell value">{{ color.value }}</td>
|
||||
<td
|
||||
class="color-table__cell color"
|
||||
:style="{ 'background-color': color.value }"
|
||||
|
@ -61,17 +51,11 @@ defineProps<Props>();
|
|||
&.value {
|
||||
font-family: monospace;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.color {
|
||||
min-width: 10vw;
|
||||
}
|
||||
}
|
||||
|
||||
&__copy {
|
||||
margin: 0 0 -0.25rem 0;
|
||||
max-height: 1.25rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue