configurable borderRadius for Button and Dropdown

This commit is contained in:
Henri
2026-01-21 19:10:35 +02:00
parent cf8b623340
commit 5d21aa119d
4 changed files with 23 additions and 17 deletions

View File

@@ -3,13 +3,14 @@
export let border = false;
export let textAlign = "left";
export let whiteSpace = "nowrap";
export let borderRadius = "8px";
</script>
<button
onclick={onClick}
class="btn"
class:borderless={!border}
style={`text-align: ${textAlign}; white-space: ${whiteSpace};`}
style={`text-align: ${textAlign}; white-space: ${whiteSpace}; border-radius: ${borderRadius};`}
{...$$restProps}
>
<slot />
@@ -19,7 +20,6 @@
.btn {
background: var(--white);
color: var(--black);
border-radius: 8px;
border: 1.5px solid transparent;
padding: 0.6em 1.2em;
font-weight: 500;