From 70be5235ba90a15b7798a7922382835fd680b1fc Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 3 Sep 2020 18:10:02 +0800 Subject: Migrate to react-bootstrap. --- .../src/app/views/timeline/TimelineInfoCard.tsx | 46 ++++++++-------------- 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'Timeline/ClientApp/src/app/views/timeline/TimelineInfoCard.tsx') diff --git a/Timeline/ClientApp/src/app/views/timeline/TimelineInfoCard.tsx b/Timeline/ClientApp/src/app/views/timeline/TimelineInfoCard.tsx index e3e89057..bf5c3105 100644 --- a/Timeline/ClientApp/src/app/views/timeline/TimelineInfoCard.tsx +++ b/Timeline/ClientApp/src/app/views/timeline/TimelineInfoCard.tsx @@ -1,14 +1,8 @@ import React from "react"; import clsx from "clsx"; -import { - Dropdown, - DropdownToggle, - DropdownMenu, - DropdownItem, - Button, -} from "reactstrap"; import { useTranslation } from "react-i18next"; import { fromEvent } from "rxjs"; +import { Dropdown, Button } from "react-bootstrap"; import { useAvatar } from "@/services/user"; import { timelineVisibilityTooltipTranslationMap } from "@/services/timeline"; @@ -23,7 +17,7 @@ export type TimelineInfoCardProps = TimelineCardComponentProps< >; const TimelineInfoCard: React.FC = (props) => { - const { onHeight, onManage } = props; + const { onHeight, onMember, onManage } = props; const { t } = useTranslation(); @@ -43,18 +37,10 @@ const TimelineInfoCard: React.FC = (props) => { return () => subscription.unsubscribe(); }); - const [manageDropdownOpen, setManageDropdownOpen] = React.useState( - false - ); - const toggleManageDropdown = React.useCallback( - (): void => setManageDropdownOpen((old) => !old), - [] - ); - return (

@@ -77,28 +63,28 @@ const TimelineInfoCard: React.FC = (props) => {
{onManage != null ? ( - - + + {t("timeline.manage")} - - - onManage("property")}> + + + onManage("property")}> {t("timeline.manageItem.property")} - - + + {t("timeline.manageItem.member")} - - - + + onManage("delete")} > {t("timeline.manageItem.delete")} - - + + ) : ( - )} -- cgit v1.2.3