Skip to content

Commit

Permalink
feat: add springConfig prop
Browse files Browse the repository at this point in the history
  • Loading branch information
la55u authored Jun 17, 2023
1 parent 78007d4 commit 1a96832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const BottomSheet = React.forwardRef<
expandOnContentDrag = false,
disableExpandList = [],
preventPullUp = false,
springConfig,
...props
},
forwardRef
Expand Down Expand Up @@ -184,7 +185,7 @@ export const BottomSheet = React.forwardRef<
},
})
),
[set]
[set, springConfig]
)
const [current, send] = useMachine(overlayMachine, {
devTools: debugging,
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { SpringConfig } from "react-spring";

export type SnapPointProps = {
/**
* The height of the sticky header, if there's one
Expand Down Expand Up @@ -163,7 +165,7 @@ export type Props = {
*/
preventPullUp?: boolean,

} & Omit<React.PropsWithoutRef<JSX.IntrinsicElements['div']>, 'children'>
} & Omit<React.PropsWithoutRef<JSX.IntrinsicElements['div']>, 'children'> & { springConfig?: SpringConfig }

export interface RefHandles {
/**
Expand Down

0 comments on commit 1a96832

Please sign in to comment.