mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-09 03:22:49 +00:00
keyboard stuff, styling things
This commit is contained in:
22
src/lib/components/Tooltip.svelte
Normal file
22
src/lib/components/Tooltip.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
export let title: string | undefined
|
||||
export let shortcut: string | undefined
|
||||
</script>
|
||||
|
||||
{#if title}
|
||||
<p>{title}</p>
|
||||
{/if}
|
||||
|
||||
{#if shortcut}
|
||||
<kbd>
|
||||
{#each shortcut.split("+") as key}
|
||||
<kbd>{key}</kbd>
|
||||
{/each}
|
||||
</kbd>
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
p {
|
||||
margin-block: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user