From c429c12afd58605b65a164231460793cd2a2a0b7 Mon Sep 17 00:00:00 2001 From: conradolandia Date: Thu, 19 Dec 2024 18:25:34 -0500 Subject: [PATCH 1/2] Fix buttons size and implement optional textSize variable for Button props --- src/lib/blocks/ContentBlock.svelte | 2 +- src/lib/components/Button.svelte | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib/blocks/ContentBlock.svelte b/src/lib/blocks/ContentBlock.svelte index 1b6743b3..da96b06d 100644 --- a/src/lib/blocks/ContentBlock.svelte +++ b/src/lib/blocks/ContentBlock.svelte @@ -110,7 +110,7 @@ {/if} {#if buttons}
{#each buttons as button} diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index fe89511b..d3d5c812 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -32,7 +32,7 @@ export let button = true; export let highlight = false; export let icon = ""; - export let iconSize = 20; + export let iconSize = 24; export let href = ""; export let rel = ""; export let text = ""; @@ -40,6 +40,7 @@ export let target = "_parent"; export let iconPosition = "right"; export let fullwidth = false; + export let textSize = ""; let currentIcon = icons[icon]; @@ -63,7 +64,11 @@ class:px-5={button} class:rounded={button} class:regular={!highlight} - class="flex items-center justify-between gap-3 text-sm lg:text-xs" + class:text-xs={textSize === 'xs'} + class:text-sm={textSize === 'sm'} + class:text-md={textSize === 'md'} + class:text-lg={textSize === 'lg'} + class="flex items-center justify-between gap-3 font-medium" > {#if iconLeft} From 44d90a8b6bbe4d16795e4c7f6820804da8e175d9 Mon Sep 17 00:00:00 2001 From: conradolandia Date: Fri, 20 Dec 2024 10:13:44 -0500 Subject: [PATCH 2/2] Add 'xl' size to button --- src/lib/components/Button.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index d3d5c812..4abaeb4c 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -68,6 +68,7 @@ class:text-sm={textSize === 'sm'} class:text-md={textSize === 'md'} class:text-lg={textSize === 'lg'} + class:text-xl={textSize === 'xl'} class="flex items-center justify-between gap-3 font-medium" > {#if iconLeft}