Skip to content

Commit 8b2e90a

Browse files
committed
fix: Fixed autofill issue
1 parent b53da15 commit 8b2e90a

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.prettierrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"semi": true,
55
"singleQuote": false,
66
"printWidth": 200,
7-
"plugins": ["prettier-plugin-tailwindcss"]
7+
"plugins": ["prettier-plugin-tailwindcss"],
8+
"tailwindFunctions": ["clsx"]
89
}

src/components/general/InputField.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ const InputField = forwardRef<HTMLInputElement, PropTypes>(({ size = "md", title
3838
"block w-full rounded-lg text-sm",
3939
"border border-gray-300 bg-gray-50 text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400",
4040
"focus:outline-none focus:ring-2 focus:ring-primary-300 dark:focus:ring-primary-800",
41+
"dark:autofill:shadow-[inset_0_0_0px_32px_rgb(55,65,81)]",
4142
{
42-
"border-red-500 text-red-900 placeholder:text-red-700 dark:text-red-500 dark:placeholder:text-red-500 dark:border-red-500": error !== undefined,
43+
"border-red-500 text-red-900 placeholder:text-red-700 dark:border-red-500 dark:text-red-500 dark:placeholder:text-red-500": error !== undefined,
4344
"pl-8": !!icon,
4445
"p-1.5": size === "sm",
4546
"p-2.5": size === "md",

src/components/general/SelectField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const SelectField = ({ size = "md", title, error, children, placeholder, classNa
3030
id={id}
3131
className={clsx(
3232
"block w-full rounded-lg text-sm",
33-
"border border-gray-300 bg-gray-50 text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400 ",
33+
"border border-gray-300 bg-gray-50 text-gray-900 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder:text-gray-400",
3434
"focus:border-primary-300 focus:ring-primary-300 dark:focus:border-primary-800 dark:focus:ring-primary-800",
3535
{
3636
"p-1.5": size === "sm",

src/hooks/useHotkey.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useCallback, useEffect } from "react";
33
const useHotKey = (callback: () => void, hotkey: { key?: string; code?: string; ctrl?: boolean }, prevent = true) => {
44
const handleKeyPress = useCallback(
55
(e: KeyboardEvent) => {
6+
if (!e.key && !e.code) return;
67
if ((hotkey.ctrl ? e.ctrlKey : true) && (e.key === hotkey.key || e.code === hotkey.code)) {
78
callback();
89
if (prevent) e.preventDefault();

src/provider/SettingsProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const defaultSettings = {
2828
const SettingsContext = createContext({
2929
settings: defaultSettings,
3030
// eslint-disable-next-line @typescript-eslint/no-unused-vars
31-
setSettings: (data: Settings) => undefined,
31+
setSettings: (_data: Settings) => undefined,
3232
});
3333

3434
const SettingsProvider = ({ children }: { children: ReactNode }) => {

0 commit comments

Comments
 (0)