chore: updated to latest @supabase/ui

This commit is contained in:
Jonathan Summers-Muir committed 2022-03-05 19:35:07 +00:00
1 parent f149f7ad2f
commit c4d4cdebef
8 files changed
+1765 -1500

No files matched your search

@@ -4,7 +4,7 @@ import {
Badge,
Button,
Card,
Auth,
// Auth,
Space,
Tabs,
Typography,
@@ -28,31 +28,31 @@ function AuthComponentExample() {
const { isDarkMode } = useTheme()
const { basePath } = useRouter()
// store API swiper instance
const [imageSwiper, setImageSwiper] = useState(undefined)
const [imageSwiperActiveIndex, setImageSwiperActiveIndex] = useState(0)
// // store API swiper instance
// const [imageSwiper, setImageSwiper] = useState(undefined)
// const [imageSwiperActiveIndex, setImageSwiperActiveIndex] = useState(0)
function handleNavChange(e: number) {
console.log(e)
setImageSwiperActiveIndex(e)
// @ts-ignore
imageSwiper.slideTo(e)
}
// function handleNavChange(e: number) {
// console.log(e)
// setImageSwiperActiveIndex(e)
// // @ts-ignore
// imageSwiper.slideTo(e)
// }
const AuthContainer = (props: any) => {
const { user } = Auth.useUser()
if (user) {
return (
<>
<Typography.Text>Signed in: {user.email}</Typography.Text>
<Button block onClick={() => props.supabaseClient.auth.signOut()}>
Sign out
</Button>
</>
)
}
return props.children
}
// const AuthContainer = (props: any) => {
// const { user } = Auth.useUser()
// if (user) {
// return (
// <>
// <Typography.Text>Signed in: {user.email}</Typography.Text>
// <Button block onClick={() => props.supabaseClient.auth.signOut()}>
// Sign out
// </Button>
// </>
// )
// }
// return props.children
// }
return (
<div className="sbui-tabs--alt">
@@ -194,11 +194,11 @@ function AuthComponentExample() {
</Typography.Text>
<div className="w-full h-[1px] bg-gray-500" />
</div>
<Auth.UserContextProvider supabaseClient={supabase}>
{/* <Auth.UserContextProvider supabaseClient={supabase}>
<AuthContainer supabaseClient={supabase}>
<Auth supabaseClient={supabase} />
</AuthContainer>
</Auth.UserContextProvider>
</Auth.UserContextProvider> */}
</Space>
</Card>
</div>
+3 -3
View File
@@ -5,7 +5,7 @@ import DefaultLayout from '~/components/Layouts/Default'
import CodeBlock from '~/components/CodeBlock/CodeBlock'
import {
Button,
Auth,
// Auth,
Card,
Checkbox,
Divider,
@@ -88,13 +88,13 @@ function AuthPage() {
<Typography.Title level={3}>{companyName}</Typography.Title>
</Space>
</div>
<Auth
{/* <Auth
providers={socialLogins ? socials : []}
socialButtonSize={widgetSize}
socialLayout={socialLoginLayout}
supabaseClient={supabase}
socialColors={socialColors}
/>
/> */}
</Space>
</Card>
</div>
+1 -1
View File
@@ -24,7 +24,7 @@ const DefaultLayout = (props: Props) => {
return (
<>
{!hideHeader && <Nav />}
<div className="min-h-screen bg-white dark:bg-gray-800">
<div className="min-h-screen">
<main>{children}</main>
</div>
{!hideFooter && <Footer />}
+1694 -1423
View File
File diff suppressed because it is too large. Load diff
+5 -4
View File
@@ -17,9 +17,10 @@
"@mdx-js/react": "^1.6.22",
"@next/mdx": "^10.0.7",
"@supabase/supabase-js": "^1.6.0",
"@supabase/ui": "^0.36.1",
"@supabase/ui": "v0.37.0-alpha.49",
"classnames": "2.2.6",
"date-fns": "2.10.0",
"deepmerge": "^4.2.2",
"globby": "^12.0.2",
"gray-matter": "^4.0.2",
"markdown-toc": "^1.2.0",
@@ -51,12 +52,12 @@
"@types/react-copy-to-clipboard": "^4.3.0",
"@types/react-dom": "^16.9.8",
"@types/react-syntax-highlighter": "^13.5.0",
"autoprefixer": "^10.3.7",
"autoprefixer": "^10.4.2",
"file-loader": "^6.2.0",
"postcss": "^8.3.11",
"postcss": "^8.4.7",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.2.1",
"tailwindcss": "^2.2.17"
"tailwindcss": "^3.0.23"
},
"license": "MIT"
}
+4 -3
View File
@@ -416,11 +416,12 @@ export default function IndexPage() {
</Link>
<div className="mt-16">
<div className="grid grid-cols-2 gap-y-10 gap-x-10">
{pricingFaq.map((faq) => {
{pricingFaq.map((faq, i) => {
return (
<div>
<Accordion bordered>
<Accordion.Item label={faq.question}>
{/* @ts-ignore */}
<Accordion type="bordered" openBehaviour="multiple" size="medium">
<Accordion.Item header={faq.question} id={`faq--${i.toString()}`}>
<Typography>
<ReactMarkdown>{faq.answer}</ReactMarkdown>
</Typography>
+6 -16
View File
@@ -1,18 +1,6 @@
@import 'tailwindcss/base';
/* Write your own custom base styles here */
/* Start purging... */
@import 'tailwindcss/components';
/* Stop purging. */
/* Write you own custom component styles here */
/* Start purging... */
@import 'tailwindcss/utilities';
/* Stop purging. */
/* Your own custom utilities */
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family: 'custom-font';
@@ -39,6 +27,7 @@ h3,
h4,
h5,
h6 {
@apply text-scale-1200;
margin-bottom: 16px;
}
@@ -75,6 +64,7 @@ h2 {
}
p {
@apply text-scale-1100;
margin-bottom: 16px;
}
@@ -90,7 +80,7 @@ html {
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@apply bg-white dark:bg-gray-800;
@apply bg-scale-200;
}
.section--masked {
+26 -24
View File
@@ -1,4 +1,6 @@
module.exports = {
const ui = require('@supabase/ui/dist/config/ui.config.js')
module.exports = ui({
purge: ['./components/**/*.tsx', './pages/**/*.tsx', './_blog/*.mdx'],
darkMode: 'class', // 'media' or 'class'
mode: 'jit',
@@ -38,17 +40,17 @@ module.exports = {
'accent-7': '#333',
success: '#0070f3',
cyan: '#79FFE1',
brand: {
100: '#82dab0',
200: '#69d3a0',
300: '#50cb90',
400: '#C5F1DD',
500: '#9FE7C7',
600: '#65D9A5',
700: '#3ECF8E',
800: '#38BC81',
900: '#10633E',
},
// brand: {
// 100: '#82dab0',
// 200: '#69d3a0',
// 300: '#50cb90',
// 400: '#C5F1DD',
// 500: '#9FE7C7',
// 600: '#65D9A5',
// 700: '#3ECF8E',
// 800: '#38BC81',
// 900: '#10633E',
// },
// Joshen TODO: At the end just rearrange the values
dark: {
100: '#eeeeee',
@@ -61,17 +63,17 @@ module.exports = {
800: '#181818',
900: '#0f0f0f',
},
gray: {
100: '#eeeeee',
200: '#e0e0e0',
300: '#bbbbbb',
400: '#666666',
500: '#444444',
600: '#2a2a2a',
700: '#1f1f1f',
800: '#181818',
900: '#0f0f0f',
},
// gray: {
// 100: '#eeeeee',
// 200: '#e0e0e0',
// 300: '#bbbbbb',
// 400: '#666666',
// 500: '#444444',
// 600: '#2a2a2a',
// 700: '#1f1f1f',
// 800: '#181818',
// 900: '#0f0f0f',
// },
},
spacing: {
28: '7rem',
@@ -130,4 +132,4 @@ module.exports = {
corePlugins: {
preflight: true,
},
}
})