From 6814811a19fad14b7051f14ebf274c4dc69d2b1d Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sun, 3 Oct 2021 18:26:44 -0600 Subject: [PATCH] ui(admin): tweaks to spacing --- resources/scripts/components/admin/AdminBox.tsx | 8 ++++---- resources/scripts/components/admin/Sidebar.tsx | 8 ++++---- .../admin/nests/eggs/EggInstallContainer.tsx | 2 +- .../admin/servers/ServerSettingsContainer.tsx | 16 +++++++--------- resources/scripts/components/elements/Field.tsx | 16 ++-------------- 5 files changed, 18 insertions(+), 32 deletions(-) diff --git a/resources/scripts/components/admin/AdminBox.tsx b/resources/scripts/components/admin/AdminBox.tsx index 847fc7076..da0543b7e 100644 --- a/resources/scripts/components/admin/AdminBox.tsx +++ b/resources/scripts/components/admin/AdminBox.tsx @@ -9,15 +9,15 @@ interface Props { isLoading?: boolean; title: string | React.ReactNode; className?: string; - padding?: boolean; + noPadding?: boolean; children: React.ReactNode; button?: React.ReactNode; } -const AdminBox = ({ icon, title, className, isLoading, children, button }: Props) => ( +const AdminBox = ({ icon, title, className, isLoading, children, button, noPadding }: Props) => (
-
+
{typeof title === 'string' ?

{icon && }{title} @@ -27,7 +27,7 @@ const AdminBox = ({ icon, title, className, isLoading, children, button }: Props } {button}

-
+
{children}
diff --git a/resources/scripts/components/admin/Sidebar.tsx b/resources/scripts/components/admin/Sidebar.tsx index b1efeb578..b5ab0a047 100644 --- a/resources/scripts/components/admin/Sidebar.tsx +++ b/resources/scripts/components/admin/Sidebar.tsx @@ -61,11 +61,11 @@ const Sidebar = styled.div<{ $collapsed?: boolean }>` } ${Wrapper} { - ${tw`px-5`}; + ${tw`px-5`}; - & > a { - ${tw`justify-center px-0`}; - } + & > a { + ${tw`justify-center px-0`}; + } } & > a { diff --git a/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx b/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx index 878f682a7..1ea32071b 100644 --- a/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx +++ b/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx @@ -50,7 +50,7 @@ export default function EggInstallContainer ({ egg }: { egg: Egg }) { }} > {({ isSubmitting, isValid }) => ( - +
diff --git a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx index bc8d9ce4f..3da8115c2 100644 --- a/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx +++ b/resources/scripts/components/admin/servers/ServerSettingsContainer.tsx @@ -257,18 +257,16 @@ export default function ServerSettingsContainer2 ({ server }: { server: Server } {({ isSubmitting, isValid }) => (
-
-
- -
-
- -
+
+ +
+
- -
+ + +
( TextareaField.displayName = 'TextareaField'; export const FieldRow = styled.div` - ${tw`mb-6 md:w-full md:flex md:flex-row`}; + ${tw`grid grid-cols-1 sm:grid-cols-2 gap-x-6 mb-6`}; & > div { - ${tw`md:w-full md:flex md:flex-col mb-6 md:mb-0`}; - - &:first-of-type { - ${tw`md:mr-3`}; - } - - &:not(:first-of-type):not(:last-of-type) { - ${tw`md:mx-3`}; - } - - &:last-of-type { - ${tw`md:ml-3`}; - } + ${tw`mb-6 sm:mb-0 sm:w-full sm:flex sm:flex-col`}; } `;