diff options
author | crupest <crupest@outlook.com> | 2020-06-08 18:11:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-08 18:11:35 +0800 |
commit | 3a40d639358724355c342441520e751bf1938d4d (patch) | |
tree | 6e81964d2a0046af3451e5a560c21b159e20ad41 /Timeline/ClientApp/src/common | |
parent | 62343100c3eeb0e2e51f8bf49c73acdf74d51080 (diff) | |
download | timeline-3a40d639358724355c342441520e751bf1938d4d.tar.gz timeline-3a40d639358724355c342441520e751bf1938d4d.tar.bz2 timeline-3a40d639358724355c342441520e751bf1938d4d.zip |
feat(front): Fix #76 .
Diffstat (limited to 'Timeline/ClientApp/src/common')
-rw-r--r-- | Timeline/ClientApp/src/common/CollapseButton.tsx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Timeline/ClientApp/src/common/CollapseButton.tsx b/Timeline/ClientApp/src/common/CollapseButton.tsx index 03f42e73..28385003 100644 --- a/Timeline/ClientApp/src/common/CollapseButton.tsx +++ b/Timeline/ClientApp/src/common/CollapseButton.tsx @@ -2,16 +2,12 @@ import React from 'react'; export interface CollapseButtonProps {
collapse: boolean;
- toggle: (visibility: boolean) => void;
+ onClick: () => void;
className?: string;
}
const CollapseButton: React.FC<CollapseButtonProps> = (props) => {
- const { toggle, collapse, className } = props;
-
- const onClick = React.useCallback(() => {
- toggle(!collapse);
- }, [toggle, collapse]);
+ const { onClick, collapse, className } = props;
return (
<svg
|