-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6452c6
commit 5c05a51
Showing
11 changed files
with
118 additions
and
122 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@svelte-put/avatar': major | ||
--- | ||
|
||
[BREAKING] drop support for Svelte 4 and lower; now using runes and snippets |
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
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,18 +1,35 @@ | ||
<script> | ||
// eslint-disable-next-line no-undef | ||
let name = $state('world'); | ||
let obj = { | ||
key: 'value', | ||
}; | ||
function func() { | ||
return 'func'; | ||
} | ||
import Avatar from '@svelte-put/avatar/Avatar.svelte'; | ||
/** passed from parent */ | ||
export let color = 'blue'; | ||
</script> | ||
|
||
<h2>Hello {name}! {obj.key} {func()} {name === 'a' ? 1 : 2}</h2> | ||
|
||
<h3 id="override">Something H3</h3> | ||
<main style:padding="200px"> | ||
<Avatar | ||
src="https://img.freepik.com/free-photo/adorable-jack-russell-retriever-puppy-portrait_53876-64825.jpg?w=2000" | ||
uiAvatar="Jim+Hopper" | ||
size={50} | ||
class="custom-avatar rounded-full" | ||
--border-color={color} | ||
/> | ||
|
||
<svg data-inline-src="phosphor/acorn" width="500" height="500" class="text-blue-500"></svg> | ||
<div style:margin-top="40px"> | ||
<Avatar | ||
size={50} | ||
gravatar="[email protected]" | ||
uiAvatar="Billy+Hargrove" | ||
> | ||
{#snippet img({ alt, size, sources, src })} | ||
<img {src} {alt} width={size} height={size} data-sources={sources} /> | ||
{/snippet} | ||
</Avatar> | ||
</div> | ||
</main> | ||
|
||
<p>something else</p> | ||
<style lang="postcss"> | ||
:global(.custom-avatar) { | ||
border: 2px var(--border-color) solid; | ||
box-shadow: 0 0 0 10px hsl(0deg 0% 50%), 0 0 0 15px hsl(0deg 0% 60%), | ||
0 0 0 20px hsl(0deg 0% 70%), 0 0 0 25px hsl(0deg 0% 80%), 0 0 0 30px hsl(0deg 0% 90%); | ||
} | ||
</style> |