diff options
author | axtloss <axtlos@disroot.org> | 2024-08-20 01:20:30 +0200 |
---|---|---|
committer | axtloss <axtlos@disroot.org> | 2024-08-20 01:20:30 +0200 |
commit | e235aa6cf4914cbff6c72f19e0fcf6888da349f7 (patch) | |
tree | 0d488cadc02706aa2c7652b42e4f21342125c5f7 /src/routes/ContactCard.svelte | |
parent | 479414a93ae03a4463c16d54b39cd155b1e04683 (diff) | |
download | website-e235aa6cf4914cbff6c72f19e0fcf6888da349f7.tar.gz website-e235aa6cf4914cbff6c72f19e0fcf6888da349f7.tar.bz2 |
yayyy new website!!
Diffstat (limited to '')
-rw-r--r-- | src/routes/ContactCard.svelte | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/routes/ContactCard.svelte b/src/routes/ContactCard.svelte new file mode 100644 index 0000000..d347deb --- /dev/null +++ b/src/routes/ContactCard.svelte @@ -0,0 +1,40 @@ +<script lang="ts"> + export let inline: boolean = false; + export let svg: string; + export let onclick; +</script> + +<div + role="button" + tabindex="0" + on:click={onclick} + on:keydown={onclick}> + <span class:inline={inline}> + {@html svg} + </span> +</div> + +<span class:inline={inline}> + {@html svg} +</span> + +<style lang="scss"> + span { + & :global(svg) { + width: 1em; + height: 1em; + fill: currentColor; + } + &.inline :global(svg) { transform: translate(0, 0.125em); } + } + + div { + background-color: green; + user-select: none; + padding: 1px 18px; + border-radius: 9999px; + display: flex; + align-items: center; + justify-content: center; + } +</style> |