fix: small fixes

This commit is contained in:
tglide committed 2023-05-02 12:08:14 +01:00
1 parent b4c3462bd8
commit 73b87adb68
3 files changed
+55 -7

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
<script lang="ts">
type Icon = {
name: string;
ariaLabel: string;
};
export let icon: Icon | undefined = undefined;
// You could use CVA to handle sizes and other variants (https://github.com/joe-bell/cva)
export let size: 'sm' | 'md' | 'lg' = 'md';
export let disabled = false;
</script>
<!-- Be sure to forward all the event handlers you need -->
<button
on:click
on:blur
on:keydown
on:keyup
on:focus
aria-label={icon.ariaLabel ?? undefined}
class="button button-{size}"
{disabled}>
{#if icon}
<!-- This is just a mock implementation, you'd probably use svgs or a lib here -->
<i class="icon-{icon.name}" />
{:else}
<slot />
{/if}
</button>
<style>
button {
}
/* States */
button:hover {
}
button:active {
}
button:focus {
}
button:disabled {
}
/* Sizes */
.button-sm {
}
.button-md {
}
.button-lg {
}
</style>
-4
View File
@@ -183,10 +183,6 @@
</main>
<style lang="scss">
:global(body) {
--main-header-height: 0px !important;
}
@media (prefers-reduced-motion: reduce) {
main * {
animation: none !important;
+4 -3
View File
@@ -127,7 +127,7 @@
<a
href="/register"
class="button u-width-full-line u-main-center u-margin-block-start-16 external-btn-top"
>Claim your card</a>
data-sveltekit-reload>Claim your card</a>
{/if}
</div>
</div>
@@ -160,9 +160,10 @@
</ul>
<div class="card-footer">
{#if variant === 'owner'}
<a href="/console" class="button">Go to console</a>
<a data-sveltekit-reload href="/console" class="button">Go to console</a>
{:else}
<a href="/card" class="button external-btn-bottom">Claim your card</a>
<a data-sveltekit-reload href="/card" class="button external-btn-bottom"
>Claim your card</a>
{/if}
</div>
</div>