Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

feat: fixed the dock build issue (#677)

Arghya Das0070b1ef700f
diff --git a/registry/magicui/dock.tsx b/registry/magicui/dock.tsx
index 0618c854..43a810f7 100644
--- a/registry/magicui/dock.tsx
+++ b/registry/magicui/dock.tsx
@@ -47,7 +47,10 @@ const Dock = React.forwardRef<HTMLDivElement, DockProps>(
const renderChildren = () => {
return React.Children.map(children, (child) => {
- if (React.isValidElement(child) && child.type === DockIcon) {
+ if (
+ React.isValidElement<DockIconProps>(child) &&
+ child.type === DockIcon
+ ) {
return React.cloneElement(child, {
...child.props,
mouseX: mouseX,