Skip to content

Commit 3e504f5

Browse files
committed
docs(storybook): document the default slot
1 parent e9d323d commit 3e504f5

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/uui-tag/lib/uui-tag.element.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { LitElement, html, css } from 'lit';
21
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
import { property } from 'lit/decorators.js';
42
import {
5-
InterfaceLookType,
63
InterfaceLookDefaultValue,
4+
InterfaceLookType,
75
} from '@umbraco-ui/uui-base/lib/types';
6+
import { css, html, LitElement } from 'lit';
7+
import { property } from 'lit/decorators.js';
88

99
/**
1010
*
1111
* @element uui-tag
1212
* @description Tag component from Umbraco UI components library. Comes in one shape, but different looks and sizes
13-
* @slot - for tag contents
13+
* @slot default - slot for tag contents
1414
* @cssprop --uui-tag-font-size - overwrite the default font-size for the tag.
1515
*/
1616
@defineElement('uui-tag')
@@ -78,9 +78,7 @@ export class UUITagElement extends LitElement {
7878

7979
/**
8080
* Defines the look of the tag.
81-
* @type {''|'primary'|'secondary'|'outline'|'placeholder'|'positive'|'warning'|'danger'}
8281
* @attr
83-
* @default ''
8482
*/
8583
@property({ reflect: true })
8684
public look: InterfaceLookType = InterfaceLookDefaultValue;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export default {
1010
id: 'uui-tag',
1111
args: {
1212
look: '',
13-
slot: 'Hello',
13+
default: 'Hello',
1414
},
1515
argTypes: {
16-
slot: { table: { category: 'slots' }, control: { type: 'text' } },
16+
default: { table: { category: 'slots' }, control: { type: 'text' } },
1717
look: {
1818
options: [
1919
'primary',
@@ -25,11 +25,12 @@ export default {
2525
'danger',
2626
],
2727
},
28+
'--uui-tag-font-size': { control: { type: 'text' } },
2829
},
2930
};
3031

3132
const Template: Story = props => html`
32-
<uui-tag .look=${props.look}>${props.slot}</uui-tag>
33+
<uui-tag .look=${props.look}>${props.default}</uui-tag>
3334
`;
3435

3536
export const AAAOverview = Template.bind({});
@@ -75,6 +76,9 @@ export const Sizing: Story = props =>
7576
`;
7677

7778
Sizing.parameters = {
79+
controls: {
80+
include: ['look'],
81+
},
7882
docs: {
7983
source: {
8084
code: `

0 commit comments

Comments
 (0)