diff --git a/package.json b/package.json index 4a3bdcb..9473744 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-tiny-popover", - "version": "8.0.2", + "version": "8.0.3", "description": "A simple and highly customizable popover react higher order component with no other dependencies!", "keywords": [ "react", diff --git a/src/index.d.ts b/src/index.d.ts index 42fe926..2b63439 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -64,8 +64,8 @@ export type ArrowContainerProps = UseArrowContainerProps & { export type BasePopoverProps = { isOpen: boolean; - align: PopoverAlign; - padding: number; + align?: PopoverAlign; + padding?: number; reposition?: boolean; parentElement?: HTMLElement; boundaryElement?: HTMLElement; diff --git a/src/usePopover.ts b/src/usePopover.ts index 338f960..243eccc 100644 --- a/src/usePopover.ts +++ b/src/usePopover.ts @@ -33,8 +33,8 @@ export const usePopover = ({ parentElement, transform, transformMode, - align, - padding, + align = 'center', + padding = 0, reposition, boundaryInset, boundaryElement,