Skip to content

Commit 151da0b

Browse files
committed
docs(storybook): handle the default slot
1 parent 741f296 commit 151da0b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/uui-avatar-group/lib/uui-avatar-group.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { property, queryAssignedElements, state } from 'lit/decorators.js';
66
/**
77
* Group a set of avatars, set a limit to minimize the visual space.
88
* @element uui-avatar-group
9-
* @slot - Insert the uui-avatar elements in the default slot
9+
* @slot - Insert the `<uui-avatar>` elements in the default slot
1010
*/
1111
@defineElement('uui-avatar-group')
1212
export class UUIAvatarGroupElement extends LitElement {

packages/uui-avatar/lib/uui-avatar.story.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export default {
1111
name: 'Umbraco HQ',
1212
fontSize: 12,
1313
},
14+
argTypes: {
15+
slot: { control: { type: 'text' } },
16+
},
1417
// argTypes: {
1518
// 'img-src': { table: { disable: true } },
1619
// 'img-srcset': { table: { disable: true } },
@@ -34,7 +37,7 @@ const Template: Story = (props: any) => html`<uui-avatar
3437
.imgSrcset=${props.imgSrcset}
3538
.name=${props.name}
3639
style="font-size: ${props.fontSize}px; background-color: ${props.backgroundColor}; color: ${props.color}"
37-
>${props.default}</uui-avatar
40+
>${props.slot}</uui-avatar
3841
>`;
3942

4043
export const AAAOverview = Template.bind({});
@@ -93,12 +96,9 @@ Colors.parameters = {
9396
};
9497

9598
export const SlottedContent = Template.bind({});
96-
SlottedContent.args = { default: 'overflow', name: '' };
97-
SlottedContent.argTypes = {
98-
default: { table: { category: 'slots' }, control: { type: 'text' } },
99-
};
99+
SlottedContent.args = { slot: 'overflow', name: '' };
100100
SlottedContent.parameters = {
101-
controls: { include: ['overflow'] },
101+
controls: { include: ['overflow', 'slot'] },
102102
docs: {
103103
source: {
104104
code: `<uui-avatar overflow name="overflow name">overflow content</uui-avatar>`,
@@ -112,7 +112,7 @@ export const InlineWithText = (props: any) => html`
112112
<uui-avatar
113113
name="Hello world"
114114
style="background-color: ${props.backgroundColor}; color: ${props.color}"
115-
>${props.default}</uui-avatar
115+
>${props.slot}</uui-avatar
116116
>
117117
around
118118
</div>
@@ -126,7 +126,7 @@ InlineWithText.parameters = {
126126
};
127127

128128
export const WithBadge = Template.bind({});
129-
WithBadge.args = { default: html`<uui-badge>!</uui-badge>`, overflow: true };
129+
WithBadge.args = { slot: html`<uui-badge>!</uui-badge>`, overflow: true };
130130
WithBadge.parameters = {
131131
controls: { include: ['overflow', 'name'] },
132132
docs: {

0 commit comments

Comments
 (0)