Skip to content

Commit 64e9003

Browse files
doc: Fix typo in the recipes
1 parent f058558 commit 64e9003

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const HeadingInner = <T extends HeadingAllowedElements>(
181181
ref: PolymorphicForwardedRef<T>,
182182
) =>
183183
createElement(
184-
element,
184+
as,
185185
{
186186
...rest,
187187
ref,
@@ -192,9 +192,7 @@ const HeadingInner = <T extends HeadingAllowedElements>(
192192

193193
// Forward refs with generics is tricky
194194
// see also https://fettblog.eu/typescript-react-generic-forward-refs/
195-
export const Heading = forwardRef<HeadingAllowedElements>(HeadingInner) as unknown as <
196-
T extends HeadingAllowedElements,
197-
>(
195+
export const Heading = forwardRef(HeadingInner) as unknown as <T extends HeadingAllowedElements>(
198196
props: HeadingProps<T> & { ref?: PolymorphicForwardedRef<T> },
199197
) => ReturnType<typeof HeadingInner>;
200198
```
@@ -254,7 +252,7 @@ const Heading = <T extends HeadingAllowedElements>({
254252
...rest
255253
}: HeadingProps<T>) =>
256254
createElement(
257-
element,
255+
as,
258256
{
259257
...rest,
260258
ref,
@@ -318,7 +316,7 @@ const HeadingInner = <T extends HeadingAllowedElements>({
318316
...rest
319317
}: HeadingProps<T>) =>
320318
createElement(
321-
element,
319+
as,
322320
{
323321
...rest,
324322
className: `${className} size-${size || 1}`,
@@ -376,7 +374,7 @@ export const Container = <T extends ContainerAllowedElements>({
376374
...rest
377375
}: ContainerProps<T>) =>
378376
createElement(
379-
element,
377+
as,
380378
{
381379
...rest,
382380
className,
@@ -434,7 +432,7 @@ const ContainerInner = <T extends ContainerAllowedElements>(
434432
ref: PolymorphicForwardedRef<T>,
435433
) =>
436434
createElement(
437-
element,
435+
as,
438436
{
439437
...rest,
440438
ref,

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
"devDependencies": {
4444
"@axa-ch/easy-config": "3.0.1",
4545
"@biomejs/biome": "1.9.4",
46-
"framer-motion": "^12.12.1",
47-
"prettier": "3.5.3",
48-
"typescript": "^5.8.3",
49-
"@types/react": "^19.1.4",
50-
"react": "^19.1.0"
46+
"framer-motion": "^12.23.12",
47+
"prettier": "3.6.2",
48+
"typescript": "^5.9.2",
49+
"@types/react": "^19.1.10",
50+
"react": "^19.1.1"
5151
},
5252
"peerDependencies": {
5353
"@types/react": "^18.0.0 || ^19.0.0",

0 commit comments

Comments
 (0)