From d5efeeb226e9a303d531083c31e2c300c2f1cadd Mon Sep 17 00:00:00 2001 From: Ryo Matsukawa <76232929+ryo-manba@users.noreply.github.com> Date: Fri, 31 May 2024 17:01:26 +0900 Subject: [PATCH] fix: remove unnecessary props --- .../date-range-picker/error-message-function.ts | 1 - .../date-input/stories/time-input.stories.tsx | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/docs/content/components/date-range-picker/error-message-function.ts b/apps/docs/content/components/date-range-picker/error-message-function.ts index 45fd417c89..9e8cb16eab 100644 --- a/apps/docs/content/components/date-range-picker/error-message-function.ts +++ b/apps/docs/content/components/date-range-picker/error-message-function.ts @@ -7,7 +7,6 @@ export default function App() { isInvalid label="Stay duration" variant="bordered" - errorMessage="Please enter your stay duration" errorMessage={(value) => { if (value.isInvalid) { return "Please enter your stay duration"; diff --git a/packages/components/date-input/stories/time-input.stories.tsx b/packages/components/date-input/stories/time-input.stories.tsx index efaab54a38..cdf090c8b1 100644 --- a/packages/components/date-input/stories/time-input.stories.tsx +++ b/packages/components/date-input/stories/time-input.stories.tsx @@ -209,12 +209,11 @@ export const WithErrorMessageFunction = { args: { ...defaultProps, isInvalid: true, - errorMessage: "Please enter a valid time", - }, - errorMessage: (value: ValidationResult) => { - if (value.isInvalid) { - return "Please enter a valid date"; - } + errorMessage: (value: ValidationResult) => { + if (value.isInvalid) { + return "Please enter a valid date"; + } + }, }, };