From 01d1c239571b8ab22eb67690ba49ad6ac42a70cd Mon Sep 17 00:00:00 2001 From: rjt Date: Tue, 20 Aug 2024 02:27:45 +0530 Subject: [PATCH 1/4] feat: setup tailwind themer --- apps/website/package.json | 4 +- apps/website/src/app/layout.tsx | 2 +- apps/website/src/app/not-found.tsx | 2 +- apps/website/src/app/page.tsx | 2 +- apps/website/src/components/common/Button.tsx | 2 +- .../website/src/components/common/Heading.tsx | 4 +- apps/website/src/components/common/Logo.tsx | 2 +- .../src/components/common/SearchBar.tsx | 6 +- .../website/src/components/common/Sidebar.tsx | 8 +- .../src/components/common/Skeleton.tsx | 7 +- apps/website/src/components/common/Toast.tsx | 4 +- .../src/components/dashboard/GuildCard.tsx | 16 ++-- .../dashboard/RefreshGuildsButton.tsx | 2 +- apps/website/src/components/footer/Footer.tsx | 6 +- apps/website/src/components/header/Navbar.tsx | 15 ++-- apps/website/src/components/header/User.tsx | 2 +- .../src/components/svg/SvgAutoModerator.tsx | 2 +- .../src/components/svg/SvgChatSift.tsx | 2 +- apps/website/src/components/svg/SvgClose.tsx | 2 +- .../website/src/components/svg/SvgDiscord.tsx | 2 +- apps/website/src/components/svg/SvgGitHub.tsx | 2 +- .../src/components/svg/SvgHamburger.tsx | 2 +- .../website/src/components/svg/SvgRefresh.tsx | 2 +- apps/website/src/components/svg/SvgSearch.tsx | 2 +- apps/website/tailwind.config.js | 87 ++++++++++--------- yarn.lock | 38 ++++++-- 26 files changed, 126 insertions(+), 99 deletions(-) diff --git a/apps/website/package.json b/apps/website/package.json index 6ce9f3b3..11c84673 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -29,6 +29,7 @@ "@types/react-dom": "^18.3.0", "autoprefixer": "^10.4.19", "postcss": "^8.4.38", + "prettier": "^3.3.3", "storybook": "^8.2.8", "tailwindcss": "^3.4.3", "typescript": "^5.5.4", @@ -49,7 +50,7 @@ "lucide-react": "^0.424.0", "next": "^14.2.5", "next-themes": "^0.3.0", - "prettier-plugin-tailwindcss": "^0.6.5", + "prettier-plugin-tailwindcss": "^0.6.6", "react": "^18.3.1", "react-aria": "^3.34.1", "react-aria-components": "^1.3.1", @@ -57,6 +58,7 @@ "react-spring": "^9.7.4", "tailwind-merge": "^2.4.0", "tailwindcss-animate": "^1.0.7", + "tailwindcss-themer": "^4.0.0", "usehooks-ts": "^3.1.0" } } diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx index 697132d8..94521be9 100644 --- a/apps/website/src/app/layout.tsx +++ b/apps/website/src/app/layout.tsx @@ -23,7 +23,7 @@ export const metadata: Metadata = { export default async function RootLayout({ children }: PropsWithChildren) { return ( - +
diff --git a/apps/website/src/app/not-found.tsx b/apps/website/src/app/not-found.tsx index 2c393ef4..ddce7893 100644 --- a/apps/website/src/app/not-found.tsx +++ b/apps/website/src/app/not-found.tsx @@ -6,7 +6,7 @@ export default function NotFound() { return (
-
diff --git a/apps/website/src/app/page.tsx b/apps/website/src/app/page.tsx index e93e10af..8af7837c 100644 --- a/apps/website/src/app/page.tsx +++ b/apps/website/src/app/page.tsx @@ -7,7 +7,7 @@ export default async function HomePage() {
diff --git a/apps/website/src/components/common/Heading.tsx b/apps/website/src/components/common/Heading.tsx index 19522d3a..ed7db70d 100644 --- a/apps/website/src/components/common/Heading.tsx +++ b/apps/website/src/components/common/Heading.tsx @@ -6,8 +6,8 @@ interface HeadingProps { export default function Heading({ title, subtitle }: HeadingProps) { return (
-

{title}

- {subtitle &&

{subtitle}

} +

{title}

+ {subtitle &&

{subtitle}

}
); } diff --git a/apps/website/src/components/common/Logo.tsx b/apps/website/src/components/common/Logo.tsx index ba1f2e61..b165b569 100644 --- a/apps/website/src/components/common/Logo.tsx +++ b/apps/website/src/components/common/Logo.tsx @@ -6,7 +6,7 @@ export default function Logo() { return ( -

+

ChatSift

diff --git a/apps/website/src/components/common/SearchBar.tsx b/apps/website/src/components/common/SearchBar.tsx index 5404a6e3..ee6bca18 100644 --- a/apps/website/src/components/common/SearchBar.tsx +++ b/apps/website/src/components/common/SearchBar.tsx @@ -37,10 +37,10 @@ export default function SearchBar({ className, ...props }: AriaSearchFieldProps ref={ref} className={cn( 'w-full flex-auto rounded-lg bg-on-tertiary pb-3 pl-4 pr-12 pt-3 text-lg font-medium text-primary', - 'border border-on-secondary dark:border-on-secondary-dark dark:bg-on-tertiary-dark dark:text-primary-dark', - 'focus:border-solid focus:border-primary focus:outline-none dark:focus:border-primary-dark', + 'border border-on-secondary', + 'focus:border-solid focus:border-primary focus:outline-none', 'disabled:cursor-not-allowed disabled:opacity-50', - 'placeholder:text-secondary dark:placeholder:text-secondary-dark', + 'placeholder:text-secondary', )} /> diff --git a/apps/website/src/components/common/Sidebar.tsx b/apps/website/src/components/common/Sidebar.tsx index 0af9774d..45abdbc6 100644 --- a/apps/website/src/components/common/Sidebar.tsx +++ b/apps/website/src/components/common/Sidebar.tsx @@ -21,7 +21,7 @@ function Desktop({ children, className }: Props) { return (