mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: unexpected undefined class in popup (#2394)
This commit is contained in:
@@ -15,7 +15,6 @@ export function AppUpdaterButton({ className, style }: AddPageButtonProps) {
|
||||
|
||||
return (
|
||||
<button
|
||||
data-testid="new-page-button"
|
||||
style={style}
|
||||
className={clsx([styles.root, className])}
|
||||
onClick={() => {
|
||||
|
||||
@@ -15,3 +15,9 @@ globalStyle('html', {
|
||||
globalStyle('html[data-theme="dark"]', {
|
||||
vars: darkCssVariables,
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
globalStyle('.undefined', {
|
||||
border: '5px solid red !important',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -97,6 +97,10 @@ export const Popper = ({
|
||||
};
|
||||
});
|
||||
|
||||
const mergedClass = [anchorClassName, children.props.className]
|
||||
.filter(Boolean)
|
||||
.join(' ');
|
||||
|
||||
return (
|
||||
<ClickAwayListener
|
||||
onClickAway={() => {
|
||||
@@ -122,9 +126,11 @@ export const Popper = ({
|
||||
},
|
||||
onPointerEnter: onPointerEnterHandler,
|
||||
onPointerLeave: onPointerLeaveHandler,
|
||||
className: `${anchorClassName ? anchorClassName + ' ' : ''}${
|
||||
children.props.className
|
||||
}`,
|
||||
...(mergedClass
|
||||
? {
|
||||
className: mergedClass,
|
||||
}
|
||||
: {}),
|
||||
})}
|
||||
{content && (
|
||||
<BasicStyledPopper
|
||||
|
||||
Reference in New Issue
Block a user