mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix popover
This commit is contained in:
1 parent
f81a1dda54
commit
ac569417c9
2 files changed
+16
-7
No files matched your search
@@ -28,9 +28,12 @@ function History({ payload }) {
|
|||||||
return history;
|
return history;
|
||||||
}, { enabled: !!load });
|
}, { enabled: !!load });
|
||||||
return (
|
return (
|
||||||
<Popover usePortal interactionKind="hover" position="bottom" onOpening={() => setLoad(true)}>
|
<Popover
|
||||||
<span>{i18n('Edited')} <span className="icon icon-expand_more"></span></span>
|
usePortal
|
||||||
<ol className="menu">
|
interactionKind="hover"
|
||||||
|
position="bottom"
|
||||||
|
onOpening={() => setLoad(true)}
|
||||||
|
content={<ol className="menu">
|
||||||
{(isLoading || isError) && (
|
{(isLoading || isError) && (
|
||||||
<li className="menu__item">
|
<li className="menu__item">
|
||||||
<a className="menu__link">
|
<a className="menu__link">
|
||||||
@@ -47,7 +50,9 @@ function History({ payload }) {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ol>
|
</ol>}
|
||||||
|
>
|
||||||
|
<span>{i18n('Edited')} <span className="icon icon-expand_more"></span></span>
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,11 @@ function Reaction({ payload, ele }) {
|
|||||||
const [finish, updateFinish] = React.useState(false);
|
const [finish, updateFinish] = React.useState(false);
|
||||||
if (finish) setTimeout(() => updateFinish(false), 1000);
|
if (finish) setTimeout(() => updateFinish(false), 1000);
|
||||||
return (
|
return (
|
||||||
<Popover usePortal interactionKind="hover" isOpen={finish ? false : (focus ? true : undefined)}>
|
<Popover
|
||||||
<span className="icon icon-emoji"></span>
|
usePortal
|
||||||
<div>
|
interactionKind="hover"
|
||||||
|
isOpen={finish ? false : (focus ? true : undefined)}
|
||||||
|
content={<div>
|
||||||
{chunk(emojiList, elesPerRow).map((line, i) => (
|
{chunk(emojiList, elesPerRow).map((line, i) => (
|
||||||
<div className="row" key={+i} style={{ paddingBottom: 4, paddingTop: 4 }}>
|
<div className="row" key={+i} style={{ paddingBottom: 4, paddingTop: 4 }}>
|
||||||
{line.map((emoji) => (
|
{line.map((emoji) => (
|
||||||
@@ -60,6 +62,8 @@ function Reaction({ payload, ele }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}>
|
||||||
|
<span className="icon icon-emoji"></span>
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user