Skip to content

Commit cae8032

Browse files
committed
fix: wordmark
1 parent 37b464b commit cae8032

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

apps/docs/components/landing/wordmark.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ export function MagicSVG({
149149
animatedY.set(-gradientSize * 2);
150150
}, [gradientSize, animatedX, animatedY]);
151151

152-
const gradientId = `magic-gradient-${Math.random().toString(36).substr(2, 9)}`;
153-
const maskId = `magic-mask-${Math.random().toString(36).substr(2, 9)}`;
152+
const gradientId = 'magic-gradient-wordmark';
153+
const maskId = 'magic-mask-wordmark';
154154

155155
return (
156156
<motion.svg
@@ -212,11 +212,14 @@ export function MagicSVG({
212212
childType !== 'mask' &&
213213
childType !== 'clipPath'
214214
) {
215-
return React.cloneElement(child as React.ReactElement<any>, {
216-
stroke: strokeColor,
217-
strokeWidth,
218-
fill,
219-
});
215+
return React.cloneElement(
216+
child as React.ReactElement<React.SVGProps<SVGElement>>,
217+
{
218+
stroke: strokeColor,
219+
strokeWidth,
220+
fill,
221+
}
222+
);
220223
}
221224
}
222225
return null;
@@ -232,11 +235,14 @@ export function MagicSVG({
232235
childType !== 'mask' &&
233236
childType !== 'clipPath'
234237
) {
235-
return React.cloneElement(child as React.ReactElement<any>, {
236-
stroke: `url(#${gradientId})`,
237-
strokeWidth: strokeWidth + 1,
238-
fill,
239-
});
238+
return React.cloneElement(
239+
child as React.ReactElement<React.SVGProps<SVGElement>>,
240+
{
241+
stroke: `url(#${gradientId})`,
242+
strokeWidth: strokeWidth + 1,
243+
fill,
244+
}
245+
);
240246
}
241247
}
242248
return null;

0 commit comments

Comments
 (0)