From 57a4aa9bc47d3d38f66819f01f41ab10e9673667 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 15 Jun 2021 16:46:12 +0800 Subject: ... --- FrontEnd/src/views/common/button/FlatButton.tsx | 7 ++++++- FrontEnd/src/views/common/button/TextButton.tsx | 7 ++++++- FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx | 13 +++++-------- 3 files changed, 17 insertions(+), 10 deletions(-) (limited to 'FrontEnd/src') diff --git a/FrontEnd/src/views/common/button/FlatButton.tsx b/FrontEnd/src/views/common/button/FlatButton.tsx index 24f47785..f5349765 100644 --- a/FrontEnd/src/views/common/button/FlatButton.tsx +++ b/FrontEnd/src/views/common/button/FlatButton.tsx @@ -12,10 +12,14 @@ function _FlatButton( text, color, onClick, + className, + style, }: { text: I18nText; color?: PaletteColorType; onClick?: () => void; + className?: string; + style?: React.CSSProperties; }, ref: React.ForwardedRef ): React.ReactElement | null { @@ -24,8 +28,9 @@ function _FlatButton( return ( diff --git a/FrontEnd/src/views/common/button/TextButton.tsx b/FrontEnd/src/views/common/button/TextButton.tsx index 2014158a..1e2b4873 100644 --- a/FrontEnd/src/views/common/button/TextButton.tsx +++ b/FrontEnd/src/views/common/button/TextButton.tsx @@ -12,10 +12,14 @@ function _TextButton( text, color, onClick, + className, + style, }: { text: I18nText; color?: PaletteColorType; onClick?: () => void; + className?: string; + style?: React.CSSProperties; }, ref: React.ForwardedRef ): React.ReactElement | null { @@ -24,8 +28,9 @@ function _TextButton( return ( diff --git a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx index 685e17be..005da933 100644 --- a/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx +++ b/FrontEnd/src/views/timeline-common/MarkdownPostEdit.tsx @@ -6,7 +6,7 @@ import { Prompt } from "react-router"; import { getHttpTimelineClient, HttpTimelinePostInfo } from "@/http/timeline"; -import FlatButton from "../common/FlatButton"; +import FlatButton from "../common/button/FlatButton"; import TabPages from "../common/TabPages"; import TimelinePostBuilder from "@/services/TimelinePostBuilder"; import ConfirmDialog from "../common/ConfirmDialog"; @@ -106,8 +106,9 @@ const MarkdownPostEdit: React.FC = ({ ) : ( <> { if (canLeave) { onClose(); @@ -115,12 +116,8 @@ const MarkdownPostEdit: React.FC = ({ setShowLeaveConfirmDialog(true); } }} - > - {t("operationDialog.cancel")} - - - {t("timeline.send")} - + /> + {canSend && } ) } -- cgit v1.2.3