Skip to content

Commit

Permalink
add info popover to click outside ignore list
Browse files Browse the repository at this point in the history
  • Loading branch information
ztanner committed Feb 19, 2025
1 parent b30743a commit 34e241c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE = [
'[data-issues-open]',
'#nextjs-dev-tools-menu',
'[data-nextjs-error-overlay-nav]',
'[data-info-popover]',
]

const Dialog: React.FC<DialogProps> = function Dialog({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function DevToolsInfo({
setPreviousOpen: (isOpen: boolean) => void
}) {
return (
<div className="dev-tools-info-popover" {...props}>
<div data-info-popover {...props}>
<div className="dev-tools-info-container">
<h1 className="dev-tools-info-title">{title}</h1>
{children}
Expand Down Expand Up @@ -44,7 +44,7 @@ export function DevToolsInfo({
}

export const DEV_TOOLS_INFO_STYLES = css`
.dev-tools-info-popover {
[data-info-popover] {
-webkit-font-smoothing: antialiased;
display: flex;
flex-direction: column;
Expand All @@ -60,7 +60,7 @@ export const DEV_TOOLS_INFO_STYLES = css`
overflow: hidden;
opacity: 0;
outline: 0;
min-width: 248px;
min-width: 350px;
transition: opacity var(--animate-out-duration-ms)
var(--animate-out-timing-function);
Expand Down

0 comments on commit 34e241c

Please sign in to comment.