From eee23c1bb5dda1788031d55405630f04737a9cd5 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Sat, 16 Apr 2022 10:25:29 +0100 Subject: [PATCH] Use prettier to order tailwind classes --- components/button/button.tsx | 4 +- components/compact-button.tsx | 4 +- components/cookie-consent.tsx | 6 +-- components/date-card.tsx | 10 ++-- components/discussion/discussion.tsx | 14 +++--- components/dropdown.tsx | 6 +-- components/error-page.tsx | 6 +-- .../date-navigation-toolbar.tsx | 6 +-- .../month-calendar/month-calendar.tsx | 32 ++++++------- .../month-calendar/time-picker.tsx | 8 ++-- .../poll-options-form/poll-options-form.tsx | 8 ++-- .../forms/poll-options-form/week-calendar.tsx | 10 ++-- components/full-page-loader.tsx | 6 +-- components/header.tsx | 4 +- components/home/bonus.tsx | 2 +- components/home/features.tsx | 20 ++++---- components/home/hero.tsx | 22 ++++----- components/home/how-it-works.tsx | 2 +- components/home/poll-demo.tsx | 12 ++--- components/home/stats.tsx | 6 +-- components/modal/modal.tsx | 10 ++-- components/name-input.tsx | 2 +- components/page-layout.tsx | 22 ++++----- components/page-layout/footer.tsx | 24 +++++----- components/poll/legacy-poll-notice.tsx | 8 ++-- components/poll/manage-poll.tsx | 2 +- components/poll/mobile-poll/mobile-poll.tsx | 22 ++++----- components/poll/notifications-toggle.tsx | 2 +- components/poll/participant-row-form.tsx | 8 ++-- components/poll/participant-row.tsx | 8 ++-- components/poll/poll-subheader.tsx | 6 +-- components/poll/poll.tsx | 22 ++++----- components/poll/score.tsx | 2 +- components/poll/time-range.tsx | 2 +- components/poll/truncated-linkify.tsx | 2 +- components/poll/user-avatar.tsx | 6 +-- components/poll/vote-icon.tsx | 2 +- components/popover.tsx | 2 +- components/sharing.tsx | 6 +-- components/standard-layout.tsx | 26 +++++----- components/steps/steps.tsx | 8 ++-- components/support.tsx | 48 +++++++++---------- components/switch.tsx | 4 +- .../time-zone-picker/time-zone-picker.tsx | 8 ++-- components/tooltip.tsx | 4 +- package.json | 1 + pages/maintenance.tsx | 6 +-- pages/new.tsx | 12 ++--- pages/poll.tsx | 18 +++---- pages/privacy-policy.tsx | 2 +- style.css | 42 ++++++++-------- yarn.lock | 5 ++ 52 files changed, 268 insertions(+), 262 deletions(-) diff --git a/components/button/button.tsx b/components/button/button.tsx index 4a5134220..27a138abd 100644 --- a/components/button/button.tsx +++ b/components/button/button.tsx @@ -44,7 +44,7 @@ const Button: React.ForwardRefRenderFunction = ( "btn-danger": type === "danger", "btn-link": type === "link", "btn-disabled": disabled, - "rounded-full p-2 h-auto": rounded, + "h-auto rounded-full p-2": rounded, "w-10 p-0": !children, }, className, @@ -54,7 +54,7 @@ const Button: React.ForwardRefRenderFunction = ( > {loading ? ( diff --git a/components/compact-button.tsx b/components/compact-button.tsx index d1e60fd47..e4cbf947f 100644 --- a/components/compact-button.tsx +++ b/components/compact-button.tsx @@ -17,10 +17,10 @@ const CompactButton: React.VoidFunctionComponent = ({ return ( ); }; diff --git a/components/cookie-consent.tsx b/components/cookie-consent.tsx index 037286933..284a04113 100644 --- a/components/cookie-consent.tsx +++ b/components/cookie-consent.tsx @@ -21,14 +21,14 @@ const CookieConsentPopover: React.VoidFunctionComponent = () => { leave="duration-200" leaveFrom="opacity-100 translate-y-0" leaveTo="opacity-0 translate-y-8" - className="bg-white z-50 p-4 pt-8 shadow-lg fixed rounded-lg w-60 text-sm bottom-8 right-8" + className="fixed bottom-8 right-8 z-50 w-60 rounded-lg bg-white p-4 pt-8 text-sm shadow-lg" >
Your privacy is important to us. We only use cookies to improve the browsing experience on this website.
-
+
Privacy Policy @@ -37,7 +37,7 @@ const CookieConsentPopover: React.VoidFunctionComponent = () => { Cookies.set("rallly_cookie_consent", "1", { expires: 365 }); setVisible(false); }} - className="grow text-white focus:ring-2 focus:ring-indigo-200 transition-all bg-indigo-500 hover:bg-indigo-500/90 active:bg-indigo-600/90 px-5 py-1 font-semibold shadow-sm rounded-md" + className="grow rounded-md bg-indigo-500 px-5 py-1 font-semibold text-white shadow-sm transition-all hover:bg-indigo-500/90 focus:ring-2 focus:ring-indigo-200 active:bg-indigo-600/90" > OK diff --git a/components/date-card.tsx b/components/date-card.tsx index b75e3c246..f4aa18ad9 100644 --- a/components/date-card.tsx +++ b/components/date-card.tsx @@ -19,20 +19,20 @@ const DateCard: React.VoidFunctionComponent = ({ return (
{annotation ? (
{annotation}
) : null} -
- +
+ {dow}
-
{day}
-
+
{day}
+
{month}
diff --git a/components/discussion/discussion.tsx b/components/discussion/discussion.tsx index 2395e0217..b4691c95e 100644 --- a/components/discussion/discussion.tsx +++ b/components/discussion/discussion.tsx @@ -45,7 +45,7 @@ const Comments: React.VoidFunctionComponent<{ canDelete?: boolean; }> = ({ comments, deletedComments, onDelete, canDelete }) => { return ( -
+
{comments.map((comment, i) => { return (
@@ -58,9 +58,9 @@ const Comments: React.VoidFunctionComponent<{ leave="transition transform duration-100" leaveFrom="opacity-100" leaveTo="opacity-0" - className="bg-white border rounded-xl px-3 py-2 shadow-sm w-fit" + className="w-fit rounded-xl border bg-white px-3 py-2 shadow-sm" > -
+
{comment.authorName} @@ -175,8 +175,8 @@ const Discussion: React.VoidFunctionComponent = ({ } return ( -
-
+
+
Comments
{comments.length ? ( @@ -211,10 +211,10 @@ const Discussion: React.VoidFunctionComponent = ({