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 | b4aae221d279738bb9001df8386b46fd640e73ff (patch) | |
tree | 4448a322575fb9396408863813066b862218b55f /Timeline/ClientApp/src/common | |
parent | fc1f48b543e07af402cf01497f4436135ea0bdf4 (diff) | |
download | timeline-b4aae221d279738bb9001df8386b46fd640e73ff.tar.gz timeline-b4aae221d279738bb9001df8386b46fd640e73ff.tar.bz2 timeline-b4aae221d279738bb9001df8386b46fd640e73ff.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
|