Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update form container

Jonathan Summers-Muirfb6e06948694
diff --git a/studio/components/ui/Forms/AutoSchemaForm.tsx b/studio/components/ui/Forms/AutoSchemaForm.tsx
index c3e5b4ff23f..bfaac8f7e58 100644
--- a/studio/components/ui/Forms/AutoSchemaForm.tsx
+++ b/studio/components/ui/Forms/AutoSchemaForm.tsx
@@ -39,12 +39,19 @@ const AutoSchemaForm = () => {
children: React.ReactNode
header?: React.ReactNode
}) => (
- <div className="grid grid-cols-12 px-8 py-2">
+ <div className="grid grid-cols-12 gap-6 px-8 py-2">
{header}
{children}
</div>
)
+ const SectionLabel = ({ children }: { children: React.ReactNode | string }) => {
+ return <label className="text-scale-1200 col-span-12 text-sm lg:col-span-4">{children}</label>
+ }
+ const SectionContent = ({ children }: { children: React.ReactNode | string }) => {
+ return <div className="col-span-12 flex flex-col gap-6 lg:col-span-8">{children}</div>
+ }
+
return (
<>
<Form
@@ -101,10 +108,8 @@ const AutoSchemaForm = () => {
</>
}
>
- <Section
- header={<label className="text-scale-1200 col-span-4 text-sm">User Signups</label>}
- >
- <div className="col-span-8 flex flex-col gap-6">
+ <Section header={<SectionLabel>User Signups</SectionLabel>}>
+ <SectionContent>
<Toggle
id="DISABLE_SIGNUP"
size="small"
@@ -113,19 +118,17 @@ const AutoSchemaForm = () => {
layout="flex"
descriptionText="If this is disabled, new users will not be able to sign up to your application."
/>
- </div>
+ </SectionContent>
</Section>
<div className="border-scale-400 border-t"></div>
- <Section
- header={<label className="text-scale-1200 col-span-4 text-sm">User Sessions</label>}
- >
- <div className="col-span-8 flex flex-col gap-6">
+ <Section header={<SectionLabel>User Sessions</SectionLabel>}>
+ <SectionContent>
{/**
*
* permitted redirects
* for anything on that domain
*
- * talk to @kangming about this
+ * check with @kangming about this
*
*/}
<Input
@@ -151,7 +154,7 @@ const AutoSchemaForm = () => {
label="Reuse Interval"
descriptionText="Time interval where the same refresh token can be used to request for an access token."
/>
- </div>
+ </SectionContent>
</Section>
</Panel>
)}
diff --git a/studio/components/ui/Forms/FormsContainer.tsx b/studio/components/ui/Forms/FormsContainer.tsx
index 6b6d73723ce..a8f5f3f00c9 100644
--- a/studio/components/ui/Forms/FormsContainer.tsx
+++ b/studio/components/ui/Forms/FormsContainer.tsx
@@ -1,5 +1,5 @@
function FormsContainer(props: { children: React.ReactNode }) {
- return <div className="max-w-6xl py-12">{props.children}</div>
+ return <div className="mx-auto max-w-4xl space-y-20 px-5 pt-12 pb-20">{props.children}</div>
}
export { FormsContainer }
diff --git a/studio/pages/project/[ref]/auth/settings-new.tsx b/studio/pages/project/[ref]/auth/settings-new.tsx
index b30eb9948cd..8110043c108 100644
--- a/studio/pages/project/[ref]/auth/settings-new.tsx
+++ b/studio/pages/project/[ref]/auth/settings-new.tsx
@@ -2,7 +2,7 @@ import { Loading } from '@supabase/ui'
import { AuthProvidersForm } from 'components/interfaces'
import CommaSeperatedString from 'components/interfaces/Forms/CommaSeperatedString'
import { AuthLayout } from 'components/layouts'
-import { AutoSchemaForm, FormHeader } from 'components/ui/Forms'
+import { AutoSchemaForm, FormHeader, FormsContainer } from 'components/ui/Forms'
import { useStore } from 'hooks'
import { observer } from 'mobx-react-lite'
import React, { useEffect } from 'react'
@@ -22,10 +22,7 @@ const PageLayout: NextPageWithLayout = () => {
if (authConfig)
return (
- <div
- style={{ width: '820px' }}
- className="py-18 mx-auto mb-20 flex flex-col space-y-20 py-16"
- >
+ <FormsContainer>
<div>
<FormHeader
title="General settings"
@@ -36,7 +33,7 @@ const PageLayout: NextPageWithLayout = () => {
<CommaSeperatedString />
<AuthProvidersForm />
- </div>
+ </FormsContainer>
)
}