Skip to content

Commit

Permalink
chore: changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed May 11, 2023
1 parent 96437bd commit 9454886
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .changeset/two-carrots-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'astro': minor
---

Added `Polymorphic` type helper to `astro/types` to easily create polymorphic components:

```astro
---
import { HTMLTag, Polymorphic } from 'astro/types';
type Props<Tag extends HTMLTag> = Polymorphic<{ as: Tag }>;
const { as: Tag, ...props } = Astro.props;
---
<Tag {...props} />
```

0 comments on commit 9454886

Please sign in to comment.