generated from prokawsar/dashboard-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Svelte 5 initial install and migration wip * State update with $state and $props * Using runes * Event handled * Refactor and update * Cleanup package * Event forward * Migration main page
- Loading branch information
Showing
22 changed files
with
244 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
<script lang="ts"> | ||
import { onMount } from 'svelte' | ||
type ButtonProp = { | ||
text: string | ||
onclick: () => void | ||
classNames: string | ||
type: 'button' | 'submit' | 'reset' | ||
} | ||
export let disabled = false | ||
export let text = '' | ||
export let classNames = '' | ||
export let type: 'button' | 'submit' | 'reset' = 'button' | ||
let { text, classNames, type = 'button', onclick, ...rest }: ButtonProp = $props() | ||
let buttonRef: HTMLButtonElement | ||
onMount(() => { | ||
$effect(() => { | ||
if (buttonRef) { | ||
buttonRef.type = type | ||
} | ||
}) | ||
</script> | ||
|
||
<button | ||
{onclick} | ||
{...rest} | ||
bind:this={buttonRef} | ||
{disabled} | ||
{type} | ||
class="border border-gray-400 rounded-md text-teal-600 font-semibold px-3 py-1 w-fit disabled:text-opacity-60 {classNames}" | ||
on:click | ||
> | ||
{text} | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div class="w-full bg-gradient-to-r from-transparent via-slate-600/10 to-transparent p-[1px]"></div> |
Oops, something went wrong.