-
Notifications
You must be signed in to change notification settings - Fork 793
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
John Jenkins
committed
Dec 18, 2024
1 parent
8592315
commit 2e4f53e
Showing
4 changed files
with
46 additions
and
19 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
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,28 @@ | ||
import { Component, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'non-shadow-multi-slots', | ||
scoped: true, | ||
styles: ` | ||
:host * { | ||
color: red; | ||
} | ||
::slotted(*) { | ||
color: blue; | ||
} | ||
`, | ||
}) | ||
export class NonShadowMultiSlots { | ||
render() { | ||
return ( | ||
<div class="wrap"> | ||
<div>Internal: BEFORE DEFAULT SLOT</div> | ||
<slot /> | ||
<div>Internal: AFTER DEFAULT SLOT</div> | ||
<div>Internal: BEFORE SECOND SLOT</div> | ||
<slot name="second-slot">Second slot fallback text</slot> | ||
<div>Internal: AFTER SECOND SLOT</div> | ||
</div> | ||
); | ||
} | ||
} |