forked from unovue/radix-vue
-
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.
feat(Avatar): render img tag on ssr (unovue#776)
* feat: render img tag on ssr * fix: self closing tags causing hydration issue * test: update avatar test * test: prevent warning of missing prop
- Loading branch information
Showing
5 changed files
with
20 additions
and
13 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
4 changes: 3 additions & 1 deletion
4
packages/radix-vue/src/Avatar/__snapshots__/Avatar.test.ts.snap
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,3 +1,5 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`given an Avatar with fallback and a working image > should render as snapshot 1`] = `"<span class="bg-blackA3 inline-flex h-[45px] w-[45px] select-none items-center justify-center overflow-hidden rounded-full align-middle"><img role="img" src="https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80" class="h-full w-full rounded-[inherit] object-cover" alt="Colm Tuite"><!--v-if--></span>"`; | ||
exports[`given an Avatar with fallback and a working image > should match after image loaded snapshot 1`] = `"<span class="bg-blackA3 inline-flex h-[45px] w-[45px] select-none items-center justify-center overflow-hidden rounded-full align-middle"><img role="img" src="https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80" class="h-full w-full rounded-[inherit] object-cover" alt="Colm Tuite" style=""><!--v-if--></span>"`; | ||
exports[`given an Avatar with fallback and a working image > should match before image loaded snapshot 1`] = `"<span class="bg-blackA3 inline-flex h-[45px] w-[45px] select-none items-center justify-center overflow-hidden rounded-full align-middle"><img role="img" src="https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80" class="h-full w-full rounded-[inherit] object-cover" alt="Colm Tuite" style="display: none;"><span class="text-violet11 leading-1 flex h-full w-full items-center justify-center bg-white text-[15px] font-medium"> CT </span></span>"`; |
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