Fix handling of pointer events for calling toasts
This commit is contained in:
parent
a1e7efee12
commit
33c5c683c7
2 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CallingToasts__inner {
|
.CallingToasts__inner {
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
pointer-events: auto;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ export function CallingToastProvider({
|
||||||
// index is toasts.length instead of toasts.length - 1 since it has already been
|
// index is toasts.length instead of toasts.length - 1 since it has already been
|
||||||
// removed from state
|
// removed from state
|
||||||
index === toasts.length
|
index === toasts.length
|
||||||
? 0
|
? '0px'
|
||||||
: `${-1 * (TOAST_HEIGHT_PX + TOAST_GAP_PX)}px`,
|
: `${-1 * (TOAST_HEIGHT_PX + TOAST_GAP_PX)}px`,
|
||||||
config: (key: string) => {
|
config: (key: string) => {
|
||||||
if (key === 'zIndex') {
|
if (key === 'zIndex') {
|
||||||
|
@ -266,9 +266,9 @@ function CallingToast(
|
||||||
props.dismissable && 'CallingToast--dismissable'
|
props.dismissable && 'CallingToast--dismissable'
|
||||||
);
|
);
|
||||||
|
|
||||||
const elementHtmlProps = {
|
const elementHtmlProps: React.HTMLAttributes<HTMLDivElement> = {
|
||||||
role: 'alert',
|
role: 'alert',
|
||||||
ariaLive: props.autoClose ? 'assertive' : 'polite',
|
'aria-live': props.autoClose ? 'assertive' : 'polite',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (props.dismissable) {
|
if (props.dismissable) {
|
||||||
|
|
Loading…
Reference in a new issue