mirror of
https://github.com/plankanban/planka.git
synced 2025-07-23 07:09:44 +02:00
Add dropzone for attachment, paste attachment from clipboard
This commit is contained in:
parent
e1364925ed
commit
246eb17249
24 changed files with 576 additions and 253 deletions
15
client/src/hooks/use-modal.js
Normal file
15
client/src/hooks/use-modal.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { useCallback, useState } from 'react';
|
||||
|
||||
export default (initialParams) => {
|
||||
const [modal, setModal] = useState(() => initialParams);
|
||||
|
||||
const open = useCallback((params) => {
|
||||
setModal(params);
|
||||
}, []);
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
setModal(null);
|
||||
}, []);
|
||||
|
||||
return [modal, open, handleClose];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue