From 41fdb4c9221ebc6781f0b8de3fc0464f84f6c954 Mon Sep 17 00:00:00 2001 From: Alex Katz Date: Fri, 20 Oct 2023 17:43:41 -0400 Subject: [PATCH] fixed align and padding erroneous requirement --- package.json | 2 +- src/index.d.ts | 4 ++-- src/usePopover.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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,