refactor(tooltip): style prop merged with the passed one (#1413)

This commit is contained in:
Junior Garcia 2023-08-15 20:28:23 -03:00 committed by GitHub
parent 6d7372ede1
commit f068552774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,6 @@
---
"@nextui-org/tooltip": patch
"@nextui-org/modal": patch
---
Tooltip style prop merged, this allows users change the z-index

View File

@ -109,7 +109,7 @@ export function useModal(originalProps: UseModalProps) {
const headerId = useId();
const bodyId = useId();
// Sync ref with popoverRef from passed ref.
// Sync ref with modalRef from passed ref.
useImperativeHandle(ref, () =>
// @ts-ignore
createDOMRef(dialogRef),

View File

@ -219,7 +219,8 @@ export function useTooltip(originalProps: UseTooltipProps) {
"data-disabled": dataAttr(isDisabled),
"data-placement": getArrowPlacement(placement, placementProp),
className: slots.base({class: baseStyles}),
...mergeProps(tooltipProps, positionProps, overlayProps, otherProps),
...mergeProps(tooltipProps, overlayProps, otherProps),
style: mergeProps(positionProps.style, otherProps.style, props.style),
id: tooltipId,
}),
[