Skip to content

Commit 4b48a54

Browse files
committed
chore: attempt to avoid conflict
1 parent b524d1f commit 4b48a54

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

.cursor/rules/stories-format.mdc

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ Required structure with visual separators between sections:
4646
// AUTODOCS STORY
4747
// ────────────────────
4848

49-
// ────────────────────
50-
// OVERVIEW STORIES
51-
// ────────────────────
52-
5349
// ──────────────────────────
5450
// ANATOMY STORIES
5551
// ──────────────────────────
@@ -122,26 +118,6 @@ export const Sizes: Story = {
122118
};
123119
```
124120

125-
### `template()` and slot content
126-
127-
`getStorybookHelpers('<tag>')` returns a `template(args)` function. Use `template({ ...args, ... })` as the default so attributes/properties from the Custom Elements Manifest and Storybook controls stay wired to the component.
128-
129-
Slot args (`default-slot`, `icon-slot`, etc.) accept strings only — they are injected via `innerHTML`. Plain text and self-contained HTML strings work fine.
130-
131-
When slot content can't be expressed as a string — for example, an imported icon or `TemplateResult` content, a Lit binding like `size=${size}`, or a `.map()` call — write the host element directly with `html` instead:
132-
133-
```typescript
134-
// slot content is a TemplateResult; use html directly
135-
html`
136-
<swc-badge variant=${args.variant} size=${args.size}>
137-
<swc-icon slot="icon">${checkmarkIconForSize(args.size)}</swc-icon>
138-
${args['default-slot']}
139-
</swc-badge>
140-
`
141-
```
142-
143-
Avoid duplicating SVG or nested components as long HTML strings just to force them through a `*-slot` arg.
144-
145121
### Documentation sections (auto-generated)
146122

147123
**Component-specific `.usage.mdx` files are no longer needed.** The `DocumentTemplate.mdx` automatically renders all standard documentation sections based on story tags:

0 commit comments

Comments
 (0)