From 0a1450b32194b2a5c20fbbc32d1bb17f6bb2fcc1 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Mon, 8 Jan 2024 17:36:33 +0100 Subject: [PATCH 1/4] Update Calendar icon in DateInput component --- src/stories/DateInput/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stories/DateInput/index.tsx b/src/stories/DateInput/index.tsx index 65c16a5..bcc0fd3 100644 --- a/src/stories/DateInput/index.tsx +++ b/src/stories/DateInput/index.tsx @@ -6,7 +6,7 @@ import { localeIt, } from "@appquality/mobiscroll"; import { ChangeEventHandler, useState } from "react"; -import { Calendar } from "react-bootstrap-icons"; +import { CalendarEventFill as CalendarIcon } from "react-bootstrap-icons"; import styled from "styled-components"; import { Button } from "../button/Button"; import { StyledInput as FormInput } from "../form/input/Input"; @@ -130,7 +130,7 @@ export const DateInput = ({ kind="transparent" onClick={show} > - + From 4d62166082a93975d6e9fe1adbad2def0a4fcad4 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Mon, 8 Jan 2024 17:40:58 +0100 Subject: [PATCH 2/4] Add color to calendar and password icons --- src/stories/DateInput/index.tsx | 3 ++- src/stories/form/input/inputIcons/PasswordIcon.tsx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stories/DateInput/index.tsx b/src/stories/DateInput/index.tsx index bcc0fd3..df97d5d 100644 --- a/src/stories/DateInput/index.tsx +++ b/src/stories/DateInput/index.tsx @@ -10,6 +10,7 @@ import { CalendarEventFill as CalendarIcon } from "react-bootstrap-icons"; import styled from "styled-components"; import { Button } from "../button/Button"; import { StyledInput as FormInput } from "../form/input/Input"; +import { aqBootstrapTheme } from "../theme/defaultTheme"; const StyledInput = styled(FormInput)` .mbsc-appquality.mbsc-textfield { @@ -130,7 +131,7 @@ export const DateInput = ({ kind="transparent" onClick={show} > - + diff --git a/src/stories/form/input/inputIcons/PasswordIcon.tsx b/src/stories/form/input/inputIcons/PasswordIcon.tsx index f89c3ff..f4c7d4f 100644 --- a/src/stories/form/input/inputIcons/PasswordIcon.tsx +++ b/src/stories/form/input/inputIcons/PasswordIcon.tsx @@ -1,5 +1,6 @@ import { EyeFill, EyeSlash } from "react-bootstrap-icons"; import { Button } from "../../../button/Button"; +import { aqBootstrapTheme } from "../../../theme/defaultTheme"; const PasswordIcon = ({ type, @@ -25,7 +26,7 @@ const PasswordIcon = ({ kind="transparent" onClick={() => setType("password")} > - + ) : ( )} From 4b07e99fea3b021379c6eae20f52893abfa52e53 Mon Sep 17 00:00:00 2001 From: Iacopo Leardini Date: Mon, 8 Jan 2024 17:48:41 +0100 Subject: [PATCH 3/4] Add isInvalid prop to DateInput component --- src/stories/DateInput/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stories/DateInput/index.tsx b/src/stories/DateInput/index.tsx index df97d5d..56a7ebe 100644 --- a/src/stories/DateInput/index.tsx +++ b/src/stories/DateInput/index.tsx @@ -52,6 +52,7 @@ export const DateInput = ({ onCancel, controls = ["date"], inputProps, + isInvalid, i18n: { locale = "en", placeholder, @@ -87,7 +88,7 @@ export const DateInput = ({ onChange && onChange(e); }; return ( - + Date: Mon, 8 Jan 2024 17:54:00 +0100 Subject: [PATCH 4/4] fix(datepicker): Add isInvalid prop to DatepickerProps --- src/stories/DateInput/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stories/DateInput/index.tsx b/src/stories/DateInput/index.tsx index 56a7ebe..9ffae1f 100644 --- a/src/stories/DateInput/index.tsx +++ b/src/stories/DateInput/index.tsx @@ -24,6 +24,7 @@ export interface DatepickerProps { id: string; name?: string; value?: string; + isInvalid?: boolean; minDate?: Date; maxDate?: Date; onOpen?: () => void;