NotifyReminderPopup uses a custom Popover (#3194)

* NotifyReminderPopup uses a custom Popover

* fix Popover resizing in storybook

* Prettified Code!

---------

Co-authored-by: janWilejan <>
Co-authored-by: janWilejan <janWilejan@users.noreply.github.com>
This commit is contained in:
janWilejan
2023-07-21 15:58:14 -07:00
committed by GitHub
co-authored by janWilejan <> janWilejan
parent 42c176f783
commit f112f9813d
4 changed files with 80 additions and 26 deletions
@@ -1,7 +1,7 @@
import { Popover } from 'antd';
import React, { useState, useEffect, FC } from 'react';
import dynamic from 'next/dynamic';
import styles from './NotifyReminderPopup.module.scss';
import { Popover } from '../Popover/Popover';
// Lazy loaded components
@@ -34,13 +34,6 @@ export const NotifyReminderPopup: FC<NotifyReminderPopupProps> = ({
}, []);
const title = <div className={styles.title}>Stay updated!</div>;
const popupStyle = {
borderRadius: '5px',
cursor: 'pointer',
paddingTop: '10px',
paddingRight: '10px',
fontSize: '14px',
};
const popupClicked = e => {
e.stopPropagation();
@@ -58,27 +51,14 @@ export const NotifyReminderPopup: FC<NotifyReminderPopupProps> = ({
<button type="button" className={styles.closebutton} onClick={popupClosed}>
<CloseOutlined />
</button>
<div className={styles.contentbutton}>
Click and never miss
<br />
future streams!
</div>
<div className={styles.contentbutton}>Click and never miss future streams!</div>
</div>
);
return (
mounted && (
<Popover
placement="topRight"
defaultOpen={openPopup}
open={openPopup}
destroyTooltipOnHide
title={title}
content={content}
overlayInnerStyle={popupStyle}
color={styles.popupBackgroundColor}
>
<div>{children}</div>
<Popover open={openPopup} title={title} content={content}>
{children}
</Popover>
)
);