4 changed files with 65 additions and 34 deletions
@ -1,30 +1,20 @@ |
|||||||
import { Button } from 'antd'; |
import { Button } from 'antd'; |
||||||
import { NotificationFilled } from '@ant-design/icons'; |
import { NotificationFilled } from '@ant-design/icons'; |
||||||
import { useState } from 'react'; |
|
||||||
import Modal from '../ui/Modal/Modal'; |
|
||||||
import s from './ActionButton.module.scss'; |
import s from './ActionButton.module.scss'; |
||||||
import BrowserNotifyModal from '../modals/BrowserNotify/BrowserNotifyModal'; |
|
||||||
|
|
||||||
export default function NotifyButton() { |
interface Props { |
||||||
const [showModal, setShowModal] = useState(false); |
onClick: () => void; |
||||||
|
} |
||||||
const buttonClicked = () => { |
|
||||||
setShowModal(true); |
|
||||||
}; |
|
||||||
|
|
||||||
|
export default function NotifyButton({ onClick }: Props) { |
||||||
return ( |
return ( |
||||||
<> |
<Button |
||||||
<Button |
type="primary" |
||||||
type="primary" |
className={`${s.button}`} |
||||||
className={`${s.button}`} |
icon={<NotificationFilled />} |
||||||
icon={<NotificationFilled />} |
onClick={onClick} |
||||||
onClick={buttonClicked} |
> |
||||||
> |
Notify |
||||||
Notify |
</Button> |
||||||
</Button> |
|
||||||
<Modal title="Notify" visible={showModal} handleCancel={() => setShowModal(false)}> |
|
||||||
<BrowserNotifyModal /> |
|
||||||
</Modal> |
|
||||||
</> |
|
||||||
); |
); |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue