Add key binds to screenslot component

This commit is contained in:
Andrew Kingston 2022-07-29 13:10:02 +01:00
parent 65e43b0f70
commit cfe10e36e4
2 changed files with 11 additions and 3 deletions

View File

@ -55,4 +55,7 @@
font-size: 12px;
font-weight: 600;
}
.is-disabled .keyBind {
color: var(--spectrum-global-color-gray-300);
}
</style>

View File

@ -31,15 +31,20 @@
<div slot="control" class="icon">
<Icon size="S" hoverable name="MoreSmallList" />
</div>
<MenuItem icon="Copy" on:click={() => storeComponentForCopy(false)}>
<MenuItem
icon="Copy"
keyBind="Ctrl+C"
on:click={() => storeComponentForCopy(false)}
>
Copy
</MenuItem>
<MenuItem
icon="ShowOneLayer"
icon="LayersSendToBack"
keyBind="Ctrl+V"
on:click={() => pasteComponent("inside")}
disabled={noPaste}
>
Paste inside
Paste
</MenuItem>
</ActionMenu>
{/if}