Skip to content

Commit

Permalink
fix: missing style prop from type in ScrollControls (#1766)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavishya-sahdev authored Dec 26, 2023
1 parent a8da89c commit 639fca1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/web/ScrollControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,14 @@ const ScrollHtml: ForwardRefComponent<{ children?: React.ReactNode; style?: Reac
}
)

type ScrollProps = {
html?: boolean
children?: React.ReactNode
}
type ScrollProps =
| { children?: React.ReactNode } & (
| {
html?: false
style?: never
}
| { html: true; style?: React.CSSProperties }
)

export const Scroll: ForwardRefComponent<ScrollProps, THREE.Group & HTMLDivElement> = /* @__PURE__ */ React.forwardRef(
({ html, ...props }: ScrollProps, ref) => {
Expand Down

1 comment on commit 639fca1

@vercel
Copy link

@vercel vercel bot commented on 639fca1 Dec 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.