🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@isoftdata/svelte-button

Package Overview
Dependencies
Maintainers
12
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isoftdata/svelte-button - npm Package Compare versions

Comparing version
1.1.4
to
1.1.5
+4
-1
dist/Button.svelte

@@ -44,2 +44,4 @@ <script>import ButtonContents from "./ButtonContents.svelte";

};
$:
console.log("button has default slot?", $$slots.default);
</script>

@@ -106,3 +108,4 @@

{wrap}
{textClass}><slot /></ButtonContents
{textClass}
showText={!!$$slots.default}><slot /></ButtonContents
>

@@ -109,0 +112,0 @@ </button>

+10
-5

@@ -5,4 +5,7 @@ <script>import Icon from "@isoftdata/svelte-icon";

export let textClass = null;
export let showText = $$slots.default;
$:
hasTextAndIcon = !!icon.class && $$slots.default;
hasTextAndIcon = !!icon.icon && $$slots.default && showText;
$:
console.log({ hasTextAndIcon });
</script>

@@ -18,6 +21,8 @@

{/if}
<span
id="buttonText"
class={textClass}><slot /></span
>
{#if showText}
<span
id="buttonText"
class={textClass}><slot /></span
>
{/if}
</span>

@@ -24,0 +29,0 @@

@@ -15,2 +15,3 @@ import { SvelteComponent } from "svelte";

textClass?: string | null | undefined;
showText?: boolean | undefined;
};

@@ -17,0 +18,0 @@ events: {

{
"name": "@isoftdata/svelte-button",
"version": "1.1.4",
"version": "1.1.5",
"scripts": {

@@ -5,0 +5,0 @@ "dev": "vite dev",

# Svelte Button
This component will conditionally render a HTML `<button>` or `<a>` element based on if a `href` prop is passed. This component uses Svelte's [`$$restProps`](https://svelte.dev/docs/basic-markup#attributes-and-props) to apply any additional props you pass as attributes on the HTML element.

@@ -3,0 +4,0 @@ ## Install