Skip to content

Commit

Permalink
Merge pull request #5526 from GeekyAnts/fix/popover-backdrop
Browse files Browse the repository at this point in the history
feat: add backdrop pseudo prop
  • Loading branch information
rayan1810 committed Nov 3, 2022
2 parents 8c57182 + 69d38e5 commit baa5af5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/composites/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const Popover = (
finalFocusRef,
useRNModal,
trapFocus = true,
_backdrop,
...props
}: IPopoverProps,
ref: any
Expand Down Expand Up @@ -101,7 +102,7 @@ const Popover = (
style={StyleSheet.absoluteFill}
>
<Popper onClose={handleClose} triggerRef={triggerRef} {...props}>
<Backdrop onPress={handleClose} bg="transparent" />
<Backdrop onPress={handleClose} bg="transparent" {..._backdrop} />
<PopoverContext.Provider
value={{
onClose: handleClose,
Expand Down
4 changes: 4 additions & 0 deletions src/components/composites/Popover/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export interface InterfacePopoverProps {
* @default false
*/
useRNModal?: boolean;
/**
* Props applied on backdrop.
*/
_backdrop?: any;
}

export type IPopoverContentImpl = {
Expand Down

0 comments on commit baa5af5

Please sign in to comment.