-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migration script messing with attributes (#14260)
- Loading branch information
1 parent
ae9f53a
commit 653f4ac
Showing
4 changed files
with
26 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: migration script messing with attributes |
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
5 changes: 5 additions & 0 deletions
5
packages/svelte/tests/migrate/samples/slot-dont-mess-with-attributes/input.svelte
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 @@ | ||
<MyComponent | ||
variant="outlined" | ||
> | ||
<slot /> | ||
</MyComponent> |
15 changes: 15 additions & 0 deletions
15
packages/svelte/tests/migrate/samples/slot-dont-mess-with-attributes/output.svelte
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,15 @@ | ||
<script> | ||
/** | ||
* @typedef {Object} Props | ||
* @property {import('svelte').Snippet} [children] | ||
*/ | ||
/** @type {Props} */ | ||
let { children } = $props(); | ||
</script> | ||
|
||
<MyComponent | ||
variant="outlined" | ||
> | ||
{@render children?.()} | ||
</MyComponent> |