@isoftdata/svelte-button
Advanced tools
@@ -29,3 +29,3 @@ <script>import ButtonContents from "./ButtonContents.svelte"; | ||
| $: | ||
| computedColor = `btn-${outline ? "outline-" : ""}${disabled && colorGreyDisabled ? "secondary" : color}`; | ||
| computedColor = `btn-${outline && (!disabled || !colorGreyDisabled) ? "outline-" : ""}${disabled && colorGreyDisabled ? "secondary" : color}`; | ||
| $: | ||
@@ -44,4 +44,2 @@ computedSize = size ? `btn-${size}` : ""; | ||
| }; | ||
| $: | ||
| isOutline = color.includes("outline"); | ||
| </script> | ||
@@ -58,3 +56,3 @@ | ||
| class:cursor-not-allowed={disabled} | ||
| class:text-white={disabled && !isOutline} | ||
| class:text-white={disabled && !outline} | ||
| on:click | ||
@@ -61,0 +59,0 @@ {title} |
+1
-1
| { | ||
| "name": "@isoftdata/svelte-button", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "vite dev", |
9281
-0.1%