From 6291796091fd8fd61690336b3ceb27c51d24b146 Mon Sep 17 00:00:00 2001 From: NiallJoeMaher Date: Mon, 30 Sep 2024 15:27:44 +0100 Subject: [PATCH] Scope global input styles --- app/(app)/create/[[...paramsArr]]/_client.tsx | 57 ++++++++++--------- app/(app)/settings/_client.tsx | 4 +- styles/globals.css | 34 ++++++----- 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/app/(app)/create/[[...paramsArr]]/_client.tsx b/app/(app)/create/[[...paramsArr]]/_client.tsx index 85e9d96e..36c36553 100644 --- a/app/(app)/create/[[...paramsArr]]/_client.tsx +++ b/app/(app)/create/[[...paramsArr]]/_client.tsx @@ -369,7 +369,7 @@ const Create = ({ session }: { session: Session }) => { <>
-
+
)}
- {/* TODO: FOLLOW UP WITH THIS, LABEL SHOULD BE VISIBLE */} - - - - {/* TODO: FOLLOW UP WITH THIS, LABEL SHOULD BE VISIBLE */} - - +
+ + + + + +
<> diff --git a/app/(app)/settings/_client.tsx b/app/(app)/settings/_client.tsx index 833b70d2..216bec8f 100644 --- a/app/(app)/settings/_client.tsx +++ b/app/(app)/settings/_client.tsx @@ -102,7 +102,7 @@ const Settings = ({ profile }: { profile: User }) => { const { size, type } = file; await getUploadUrl( - { size, type, config: { kind: "uploads", userId: "me" } }, + { size, type }, { onError(error) { if (error) return toast.error(error.message); @@ -128,7 +128,7 @@ const Settings = ({ profile }: { profile: User }) => { }; return ( -
+
diff --git a/styles/globals.css b/styles/globals.css index 05c5bd7e..0421fa80 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -18,31 +18,29 @@ body { @tailwind components; @tailwind utilities; -/* Removed search styles because it upset new search bar */ - @layer base { - [type="text"], - [type="email"], - [type="url"], - [type="password"], - [type="number"], - [type="date"], - [type="datetime-local"], - [type="month"], - [type="tel"], - [type="time"], - [type="week"], - [multiple], - textarea, - select { + .old-input [type="text"]:not(#article-title), + .old-input [type="email"], + .old-input [type="url"], + .old-input [type="password"], + .old-input [type="number"], + .old-input [type="date"], + .old-input [type="datetime-local"], + .old-input [type="month"], + .old-input [type="tel"], + .old-input [type="time"], + .old-input [type="week"], + .old-input [multiple], + .old-input textarea:not(#article-content), + .old-input select { @apply mt-1 block w-full border px-2 py-2 text-black shadow-sm ring-offset-1 focus:border-pink-500 focus:outline-none focus:ring-2 focus:ring-neutral-300 disabled:opacity-50 dark:border-white dark:bg-black dark:text-white sm:text-sm; } - a { + .old-input a { @apply focus-style; } - label { + .old-input label { @apply block text-sm font-medium text-neutral-900 dark:text-white; } }