From 26e34b6b837acfe384b802770fa8e3a0b549344b Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sun, 12 Jan 2025 15:29:23 +0100 Subject: [PATCH] chore: update Prettier configuration and add Tailwind CSS plugin; refactor CSS classes for consistency - Updated .prettierrc to include Tailwind CSS plugin and functions. - Added prettier-plugin-tailwindcss to package.json and pnpm-lock.yaml. - Refactored CSS classes in main.css and various TSX files for improved consistency and readability. - Adjusted spacing in several components to enhance layout and maintain uniformity. --- .prettierrc | 4 +- apps/artboard/src/styles/main.css | 2 +- apps/client/index.html | 2 +- .../builder/sidebars/left/sections/basics.tsx | 2 +- .../left/sections/shared/section-base.tsx | 2 +- .../left/sections/shared/section-dialog.tsx | 4 +- .../left/sections/shared/section-options.tsx | 2 +- .../sidebars/right/sections/information.tsx | 2 +- .../sidebars/right/sections/layout.tsx | 2 +- .../builder/sidebars/right/sections/notes.tsx | 2 +- .../builder/sidebars/right/sections/page.tsx | 2 +- .../sidebars/right/sections/sharing.tsx | 2 +- .../sidebars/right/sections/statistics.tsx | 2 +- .../sidebars/right/sections/template.tsx | 2 +- .../builder/sidebars/right/sections/theme.tsx | 2 +- .../sidebars/right/sections/typography.tsx | 8 +-- .../src/pages/home/sections/support/index.tsx | 2 +- .../pages/home/sections/templates/index.tsx | 2 +- package.json | 1 + pnpm-lock.yaml | 62 +++++++++++++++++++ 20 files changed, 87 insertions(+), 22 deletions(-) diff --git a/.prettierrc b/.prettierrc index 12406fd4..36e1ed2f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,6 @@ { "printWidth": 100, - "endOfLine": "auto" + "endOfLine": "auto", + "plugins": ["prettier-plugin-tailwindcss"], + "tailwindFunctions": ["cn", "cva"] } diff --git a/apps/artboard/src/styles/main.css b/apps/artboard/src/styles/main.css index fe01468d..b9005d84 100644 --- a/apps/artboard/src/styles/main.css +++ b/apps/artboard/src/styles/main.css @@ -21,5 +21,5 @@ } .wysiwyg { - @apply prose max-w-none prose-foreground prose-headings:mt-0 prose-headings:mb-2 prose-p:mt-0 prose-p:mb-2 prose-ul:mt-0 prose-ul:mb-2 prose-li:mt-0 prose-li:mb-2 prose-ol:mt-0 prose-ol:mb-2 prose-img:mt-0 prose-img:mb-2 prose-hr:mt-0 prose-hr:mb-2 prose-p:leading-normal prose-li:leading-normal prose-a:break-all; + @apply prose-foreground prose max-w-none prose-headings:mb-2 prose-headings:mt-0 prose-p:mb-2 prose-p:mt-0 prose-p:leading-normal prose-a:break-all prose-ol:mb-2 prose-ol:mt-0 prose-ul:mb-2 prose-ul:mt-0 prose-li:mb-2 prose-li:mt-0 prose-li:leading-normal prose-img:mb-2 prose-img:mt-0 prose-hr:mb-2 prose-hr:mt-0; } diff --git a/apps/client/index.html b/apps/client/index.html index db5e38b6..879f1200 100644 --- a/apps/client/index.html +++ b/apps/client/index.html @@ -35,7 +35,7 @@ - +
diff --git a/apps/client/src/pages/builder/sidebars/left/sections/basics.tsx b/apps/client/src/pages/builder/sidebars/left/sections/basics.tsx index fc45f8e5..d041032d 100644 --- a/apps/client/src/pages/builder/sidebars/left/sections/basics.tsx +++ b/apps/client/src/pages/builder/sidebars/left/sections/basics.tsx @@ -18,7 +18,7 @@ export const BasicsSection = () => {
{getSectionIcon("basics")} -

{t`Basics`}

+

{t`Basics`}

diff --git a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-base.tsx b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-base.tsx index 6a5206fc..7d016854 100644 --- a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-base.tsx +++ b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-base.tsx @@ -100,7 +100,7 @@ export const SectionBase = ({ id, title, description }: P
{getSectionIcon(id)} -

{section.name}

+

{section.name}

diff --git a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx index d73b195f..5d610bd7 100644 --- a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx +++ b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx @@ -149,7 +149,7 @@ export const SectionDialog = ({
@@ -165,7 +165,7 @@ export const SectionDialog = ({
- + diff --git a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx index 922f50f6..ee2c9476 100644 --- a/apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx +++ b/apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx @@ -82,7 +82,7 @@ export const SectionOptions = ({ id }: Props) => { - + {hasItems && ( <> diff --git a/apps/client/src/pages/builder/sidebars/right/sections/information.tsx b/apps/client/src/pages/builder/sidebars/right/sections/information.tsx index b5c37165..c5326816 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/information.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/information.tsx @@ -114,7 +114,7 @@ export const InformationSection = () => {
{getSectionIcon("information")} -

{t`Information`}

+

{t`Information`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/layout.tsx b/apps/client/src/pages/builder/sidebars/right/sections/layout.tsx index 7b14f509..ee9b1cd0 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/layout.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/layout.tsx @@ -204,7 +204,7 @@ export const LayoutSection = () => {
{getSectionIcon("layout")} -

{t`Layout`}

+

{t`Layout`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/notes.tsx b/apps/client/src/pages/builder/sidebars/right/sections/notes.tsx index cc64da68..6e72553c 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/notes.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/notes.tsx @@ -14,7 +14,7 @@ export const NotesSection = () => {
{getSectionIcon("notes")} -

{t`Notes`}

+

{t`Notes`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/page.tsx b/apps/client/src/pages/builder/sidebars/right/sections/page.tsx index 4e262127..0a0f7d2e 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/page.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/page.tsx @@ -23,7 +23,7 @@ export const PageSection = () => {
{getSectionIcon("page")} -

{t`Page`}

+

{t`Page`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx b/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx index 4881786c..0c38cfed 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/sharing.tsx @@ -36,7 +36,7 @@ export const SharingSection = () => {
{getSectionIcon("sharing")} -

{t`Sharing`}

+

{t`Sharing`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx b/apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx index 91df1787..9092c078 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx @@ -20,7 +20,7 @@ export const StatisticsSection = () => {
{getSectionIcon("statistics")} -

{t`Statistics`}

+

{t`Statistics`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/template.tsx b/apps/client/src/pages/builder/sidebars/right/sections/template.tsx index e229618e..cba82c2d 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/template.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/template.tsx @@ -16,7 +16,7 @@ export const TemplateSection = () => {
{getSectionIcon("template")} -

{t`Template`}

+

{t`Template`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/theme.tsx b/apps/client/src/pages/builder/sidebars/right/sections/theme.tsx index 37203683..f912d7e6 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/theme.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/theme.tsx @@ -17,7 +17,7 @@ export const ThemeSection = () => {
{getSectionIcon("theme")} -

{t`Theme`}

+

{t`Theme`}

diff --git a/apps/client/src/pages/builder/sidebars/right/sections/typography.tsx b/apps/client/src/pages/builder/sidebars/right/sections/typography.tsx index 1c47c6df..21273e47 100644 --- a/apps/client/src/pages/builder/sidebars/right/sections/typography.tsx +++ b/apps/client/src/pages/builder/sidebars/right/sections/typography.tsx @@ -62,11 +62,11 @@ export const TypographySection = () => {
{getSectionIcon("typography")} -

{t`Typography`}

+

{t`Typography`}

-
+
{fontSuggestions.map((font) => (