From 6e773b0a13804ff5658b10af960dbb806821a8ea Mon Sep 17 00:00:00 2001 From: MurakawaTakuya Date: Mon, 2 Dec 2024 16:53:32 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=80=E3=83=83=E3=82=B7=E3=83=A5=E3=83=9C?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AE=E8=A1=A8=E7=A4=BA=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Components/Progress/Progress.module.scss | 12 --- src/Components/Progress/Progress.tsx | 77 ++++++++++++-------- 2 files changed, 48 insertions(+), 41 deletions(-) delete mode 100644 src/Components/Progress/Progress.module.scss diff --git a/src/Components/Progress/Progress.module.scss b/src/Components/Progress/Progress.module.scss deleted file mode 100644 index 846c790..0000000 --- a/src/Components/Progress/Progress.module.scss +++ /dev/null @@ -1,12 +0,0 @@ -.stepperBox { - background: #f3f3f3; - border-radius: 15px; - margin: 10px auto; - padding: 10px; - width: 90%; -} - -.successPost { - display: flex; - flex-direction: column; -} diff --git a/src/Components/Progress/Progress.tsx b/src/Components/Progress/Progress.tsx index 70b67d9..5251084 100644 --- a/src/Components/Progress/Progress.tsx +++ b/src/Components/Progress/Progress.tsx @@ -19,6 +19,12 @@ interface ProgressProps { pendingResults?: GoalWithId[]; } +const successPostIndicatorStyle = { + "& > div": { + placeSelf: "start", + }, +}; + export default function Progress({ successResults = [], failedResults = [], @@ -54,7 +60,7 @@ export default function Progress({ const successStep = (result: SuccessResult) => { return ( - + { } > - + } > - + {result.storedId && ( @@ -100,7 +115,7 @@ const successStep = (result: SuccessResult) => { const failedStep = (result: GoalWithId) => { return ( - + @@ -108,7 +123,11 @@ const failedStep = (result: GoalWithId) => { } > - + ); @@ -116,7 +135,7 @@ const failedStep = (result: GoalWithId) => { const pendingStep = (result: GoalWithId) => { return ( - + { } > - + ); }; -const StepperBlock = ({ - children, - resultType, -}: { - children: ReactNode; - resultType?: "success" | "failed" | "pending"; -}) => { +const StepperBlock = ({ children }: { children: ReactNode }) => { return ( - + ({ @@ -192,12 +196,27 @@ const StepperBlock = ({ const GoalCard = ({ deadline, goalText, + resultType, }: { deadline: string; goalText: string; + resultType?: "success" | "failed" | "pending"; }) => { return ( - + {formatStringToDate(deadline)} {goalText}