-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmixed-hidden-slots.stories.ts
32 lines (27 loc) · 1.03 KB
/
mixed-hidden-slots.stories.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { html as litHTML } from 'lit';
import '../src/index.js';
export default {
title: 'MixedHiddenSlots',
component: 'mixed-hidden-slots',
};
// ////////////////////////////////////////////////////////////////////////////
// Doesn't work.
// There is no way to forward the "external" slot in this case.
export const Default = () => litHTML`
<mixed-hidden-slots>
<span slot="external">This content was provided externally.</span>
<span slot="hidden">This content wanted to be in the hidden slot, but can't be.</span>
</mixed-hidden-slots>
`;
export const SetInner = () => litHTML`
<mixed-hidden-slots>
<span slot="external">This content was provided externally.</span>
<span slot="impl">This content was slotted into impl. That is unavoidable.</span>
</mixed-hidden-slots>
`;
export const NoDefault = () => litHTML`
<mixed-hidden-slots>
<span slot="external">This content was provided externally.</span>
<span>This content was slotted into default slot, but not shown in the UI</span>
</mixed-hidden-slots>
`;