fix: fix slot type error
Some checks failed
Deploy React Webpage / build (push) Has been cancelled
Deploy React Webpage / deploy (push) Has been cancelled

This commit is contained in:
Shinwoo PARK 2025-03-12 13:26:39 +09:00
parent dce7823955
commit fb2002a0a4

View File

@ -85,7 +85,10 @@ export const Slot = React.forwardRef<
return null; return null;
} }
return React.cloneElement(children, { return React.cloneElement(children, {
...mergeReactProps(safeSlotProps, children.props), ...mergeReactProps(
safeSlotProps,
children.props as Record<string, unknown>,
),
ref: combinedRef([ ref: combinedRef([
ref, ref,
(children as unknown as { ref: React.Ref<HTMLElement> }).ref, (children as unknown as { ref: React.Ref<HTMLElement> }).ref,