From 64d8b75f3ec4a70d39d9a1b10a6b602843f4f3ff Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Mon, 15 Apr 2024 13:58:02 -0500 Subject: [PATCH] Add autocomplete attribute to Input component --- src/components/UI/Input.astro | 3 +++ src/pages/[lang]/index.astro | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/UI/Input.astro b/src/components/UI/Input.astro index 12d55c6..a5150f1 100644 --- a/src/components/UI/Input.astro +++ b/src/components/UI/Input.astro @@ -6,6 +6,7 @@ const { placeholder, className, defaultStyles = true, + autocomplete = "on", } = Astro.props; const styleList = className ? className.split(" ") : []; @@ -21,6 +22,7 @@ interface Props { placeholder?: string; className?: string; defaultStyles?: boolean; + autocomplete?: string; } --- @@ -31,4 +33,5 @@ interface Props { value={defaultTextContent || ""} type="text" class={styleList.map((style) => style).join(" ")} + autocomplete={autocomplete} /> diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index bdabcad..3c3bf49 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -25,6 +25,7 @@ export function getStaticPaths() { placeholder={t("menu.search")} defaultStyles={false} transition:persist + autocomplete="off" />
Loading...