-
-
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.
complain if named slots other than direct descendant of component
- Loading branch information
Showing
10 changed files
with
55 additions
and
18 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
1 change: 1 addition & 0 deletions
1
test/runtime/samples/component-slot-nested-error-2/Nested.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 @@ | ||
<slot name="slot2"></slot> |
3 changes: 3 additions & 0 deletions
3
test/runtime/samples/component-slot-nested-error-2/_config.js
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,3 @@ | ||
export default { | ||
error: [`Element with a slot='...' attribute must be a direct descendant of a component or custom element`] | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/runtime/samples/component-slot-nested-error-2/main.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,11 @@ | ||
<script> | ||
import Nested from "./Nested.svelte"; | ||
</script> | ||
|
||
<Nested> | ||
<div slot="slot1"> | ||
<div> | ||
<div slot="slot2" /> | ||
</div> | ||
</div> | ||
</Nested> |
1 change: 1 addition & 0 deletions
1
test/runtime/samples/component-slot-nested-error-3/Nested.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 @@ | ||
<slot name="slot2"></slot> |
3 changes: 3 additions & 0 deletions
3
test/runtime/samples/component-slot-nested-error-3/_config.js
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,3 @@ | ||
export default { | ||
error: [`Element with a slot='...' attribute must be a direct descendant of a component or custom element`] | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/runtime/samples/component-slot-nested-error-3/main.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,11 @@ | ||
<script> | ||
import Nested from "./Nested.svelte"; | ||
</script> | ||
|
||
<Nested> | ||
<div> | ||
<div> | ||
<div slot="slot2" /> | ||
</div> | ||
</div> | ||
</Nested> |
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 @@ | ||
<slot name="slot2"></slot> |
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,3 @@ | ||
export default { | ||
error: [`Element with a slot='...' attribute must be a direct descendant of a component or custom element`] | ||
}; |
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,9 @@ | ||
<script> | ||
import Nested from "./Nested.svelte"; | ||
</script> | ||
|
||
<Nested> | ||
<div slot="slot1"> | ||
<div slot="slot2" /> | ||
</div> | ||
</Nested> |