mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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;
|
||||
}, { enabled: !!load });
|
||||
return (
|
||||
<Popover usePortal interactionKind="hover" position="bottom" onOpening={() => setLoad(true)}>
|
||||
<span>{i18n('Edited')} <span className="icon icon-expand_more"></span></span>
|
||||
<ol className="menu">
|
||||
<Popover
|
||||
usePortal
|
||||
interactionKind="hover"
|
||||
position="bottom"
|
||||
onOpening={() => setLoad(true)}
|
||||
content={<ol className="menu">
|
||||
{(isLoading || isError) && (
|
||||
<li className="menu__item">
|
||||
<a className="menu__link">
|
||||
@@ -47,7 +50,9 @@ function History({ payload }) {
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</ol>}
|
||||
>
|
||||
<span>{i18n('Edited')} <span className="icon icon-expand_more"></span></span>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,9 +38,11 @@ function Reaction({ payload, ele }) {
|
||||
const [finish, updateFinish] = React.useState(false);
|
||||
if (finish) setTimeout(() => updateFinish(false), 1000);
|
||||
return (
|
||||
<Popover usePortal interactionKind="hover" isOpen={finish ? false : (focus ? true : undefined)}>
|
||||
<span className="icon icon-emoji"></span>
|
||||
<div>
|
||||
<Popover
|
||||
usePortal
|
||||
interactionKind="hover"
|
||||
isOpen={finish ? false : (focus ? true : undefined)}
|
||||
content={<div>
|
||||
{chunk(emojiList, elesPerRow).map((line, i) => (
|
||||
<div className="row" key={+i} style={{ paddingBottom: 4, paddingTop: 4 }}>
|
||||
{line.map((emoji) => (
|
||||
@@ -60,6 +62,8 @@ function Reaction({ payload, ele }) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}>
|
||||
<span className="icon icon-emoji"></span>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user