Skip to content

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

added passwordless page

Jonathan Summers-Muir756b932eb72d
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 3b45497a056..9bc706027e4 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -150,33 +150,39 @@ export const cli = {
export const SocialLoginItems = [
{
- name: 'Apple login',
- icon: '/docs/img/icons/apple-icon',
- url: '/guides/auth/0auth-login/auth-apple',
+ name: 'Google login',
+ icon: '/docs/img/icons/google-icon',
+ url: '/guides/auth/0auth-login/auth-google',
items: [],
},
{
- name: 'Azure login',
- icon: '/docs/img/icons/microsoft-icon',
- url: '/guides/auth/0auth-login/auth-azure',
+ name: 'Facebook login',
+ icon: '/docs/img/icons/facebook-icon',
+ url: '/guides/auth/0auth-login/auth-facebook',
items: [],
},
{
- name: 'Bitbucket login',
- icon: '/docs/img/icons/bitbucket-icon',
- url: '/guides/auth/0auth-login/auth-bitbucket',
+ name: 'Twitter login',
+ icon: '/docs/img/icons/twitter-icon',
+ url: '/guides/auth/0auth-login/auth-twitter',
items: [],
},
{
- name: 'Discord login',
- icon: '/docs/img/icons/discord-icon',
- url: '/guides/auth/0auth-login/auth-discord',
+ name: 'LinkedIn login',
+ icon: '/docs/img/icons/linkedin-icon',
+ url: '/guides/auth/0auth-login/auth-linkedin',
items: [],
},
{
- name: 'Facebook login',
- icon: '/docs/img/icons/facebook-icon',
- url: '/guides/auth/0auth-login/auth-facebook',
+ name: 'Apple login',
+ icon: '/docs/img/icons/apple-icon',
+ url: '/guides/auth/0auth-login/auth-apple',
+ items: [],
+ },
+ {
+ name: 'Azure login',
+ icon: '/docs/img/icons/microsoft-icon',
+ url: '/guides/auth/0auth-login/auth-azure',
items: [],
},
{
@@ -193,21 +199,21 @@ export const SocialLoginItems = [
items: [],
},
{
- name: 'Google login',
- icon: '/docs/img/icons/google-icon',
- url: '/guides/auth/0auth-login/auth-google',
+ name: 'Bitbucket login',
+ icon: '/docs/img/icons/bitbucket-icon',
+ url: '/guides/auth/0auth-login/auth-bitbucket',
items: [],
},
{
- name: 'Keycloak login',
- icon: '/docs/img/icons/keycloak-icon',
- url: '/guides/auth/0auth-login/auth-keycloak',
+ name: 'Discord login',
+ icon: '/docs/img/icons/discord-icon',
+ url: '/guides/auth/0auth-login/auth-discord',
items: [],
},
{
- name: 'LinkedIn login',
- icon: '/docs/img/icons/linkedin-icon',
- url: '/guides/auth/0auth-login/auth-linkedin',
+ name: 'Keycloak login',
+ icon: '/docs/img/icons/keycloak-icon',
+ url: '/guides/auth/0auth-login/auth-keycloak',
items: [],
},
{
@@ -234,12 +240,6 @@ export const SocialLoginItems = [
url: '/guides/auth/0auth-login/auth-twitch',
items: [],
},
- {
- name: 'Twitter login',
- icon: '/docs/img/icons/twitter-icon',
- url: '/guides/auth/0auth-login/auth-twitter',
- items: [],
- },
{
name: 'WorkOS login',
icon: '/docs/img/icons/workos-icon',
@@ -250,21 +250,26 @@ export const SocialLoginItems = [
export const PhoneLoginsItems = [
{
- name: 'Twilio login',
+ name: 'Twilio SMS login',
icon: '/docs/img/icons/twilio-icon',
- url: '/guides/auth/auth-twilio',
+ url: '/guides/auth/passwordless-login/phone-sms-otp-twilio',
+ linkDescription: 'Customer engagement platform used by hundreds of thousands of businesses.',
items: [],
},
{
- name: 'Vonage login',
+ name: 'Vonage SMS login',
icon: '/docs/img/icons/vonage-icon',
- url: '/guides/auth/auth-vonage',
+ url: '/guides/auth/passwordless-login/phone-sms-otp-vonage',
+ linkDescription:
+ 'Vonage is a communication platform as a service (CPaaS) provider for consumers and businesses',
items: [],
+ isDarkMode: true,
},
{
- name: 'MessageBird login',
+ name: 'MessageBird SMS login',
icon: '/docs/img/icons/messagebird-icon',
- url: '/guides/auth/auth-messagebird',
+ linkDescription: 'communication between businesses and their customers — across any channel.',
+ url: '/guides/auth/passwordless-login/phone-sms-otp-messagebird',
items: [],
},
]
@@ -282,13 +287,24 @@ export const auth = {
url: undefined,
items: [
{ name: 'Email login', url: '/guides/auth/auth-email', items: [] },
- { name: 'Magic Link login', url: '/guides/auth/auth-magic-link', items: [] },
{
name: '0Auth Login',
url: '/guides/auth/0auth-login',
items: [...SocialLoginItems],
},
- { name: 'Phone Login', url: '/guides/auth/phone-login', items: [...PhoneLoginsItems] },
+ {
+ name: 'Passwordless login',
+ url: '/guides/auth/passwordless-login',
+ items: [
+ {
+ name: 'Magiclink login',
+ icon: '',
+ url: '/guides/auth/passwordless-login/email-otp-magic-link',
+ items: [],
+ },
+ ...PhoneLoginsItems,
+ ],
+ },
],
},
{
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
index a03f8edca30..3875e641916 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
@@ -11,12 +11,10 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, id }) => {
const menu = NavItems[id]
- console.log('router', router)
-
+ // get url
const url = router.asPath
-
- const firstLevelRoute = url.split('/').slice(0, 4).join('/')
- console.log('firstLevelRoute', firstLevelRoute)
+ // remove the end of the url if a deep link
+ const firstLevelRoute = url?.split('/')?.slice(0, 4)?.join('/')
return (
<Accordion.Root
diff --git a/apps/docs/pages/guides/auth/0auth-login.mdx b/apps/docs/pages/guides/auth/0auth-login.mdx
index ff1170fafd6..d2abaafc544 100644
--- a/apps/docs/pages/guides/auth/0auth-login.mdx
+++ b/apps/docs/pages/guides/auth/0auth-login.mdx
@@ -8,17 +8,35 @@ export const meta = {
description: 'Logging in with social accounts',
}
-hello world
+Implement Social Login in a heartbeat with Supabase and increase your registrations.
-asdsa
+## What is 0Auth login?
-dasd
+Oauth is an open standard for authentication that allows users to log in to one website or application using their credentials from another website or application.
+It is a way for users to grant third-party applications access to their online accounts without sharing their passwords.
-## adsd
+Oauth is commonly used for things like logging in to a social media account from a third-party app. It is a secure and convenient way to authenticate users and share information between applications.
-adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd
+## Why should I use 0Auth logins for my application?
-<div className="grid grid-cols-12 gap-10 not-prose py-16">
+There are several reasons why you might want to add social login to your applications:
+
+1. **Improved user experience**: Social login allows users to log in to your application using their existing social media accounts, which can be faster and more convenient than creating a new account from scratch. This can make it easier for users to access your application, which can improve their overall experience.
+
+2. **Increased registration and conversion rates**: Social login can make it easier for users to register for and use your application, which can lead to increased registration and conversion rates. By making the registration process simpler and more convenient, you can attract more users and encourage them to take the desired actions within your application.
+
+3. **Better user engagement**: By using social login, you can access additional data and insights about your users, such as their interests, demographics, and social connections. This can help you tailor your content and marketing efforts to better engage with your users and provide a more personalized experience.
+
+4. **Increased security**: Social login can improve the security of your application by leveraging the security measures and authentication protocols of the social media platforms that your users are logging in with. This can help protect against unauthorized access and account takeovers.
+
+Overall, adding social login to your applications can improve the user experience, increase registration and conversion rates, enhance user engagement, and improve security.
+
+## Setting up a Social Provider to use Supabase 0Auth
+
+You can follow each of these guides to implement Social 0Auth for any of these providers.
+If you've already set up your social provider you skip ahead and follow the implementation instructions [here](#how-to-add-social-0auth-to-your-application)
+
+<div className="grid grid-cols-12 gap-10 not-prose py-8">
{SocialLoginItems.map((item) => (
<Link href={`/${item.url}`} key={item.name} passHref>
<a className="col-span-4">
@@ -36,6 +54,145 @@ adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd
</div>
+## How to add Social 0Auth to your application
+
+To use a social provider (e.g. Google, Facebook, Twitter) with Supabase in a JavaScript application, you can follow these steps:
+
+Make sure the social provider is added and enabled in the Supabase dashboard, as described in the previous answer.
+
+Install the Supabase client library in your JavaScript application by running the following command:
+
+<Tabs
+ scrollable
+ size="large"
+ type="underlined"
+ defaultActiveId="js"
+>
+<TabPanel id="js" label="JavaScript" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/javascript-icon.svg"/>}>
+
+<div>
+
+Pick the framework (if any) that you are using:
+
+<Tabs
+ scrollable
+ size="small"
+ type="pills"
+ defaultActiveId="react"
+>
+
+<TabPanel id="react" label="React" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/react-icon.svg"/>}>
+
+<CH.Code>
+
+```js src/Auth.js
+import { useState } from 'react'
+import { supabase } from './supabaseClient'
+
+export default function Auth() {
+ const handleLogin = async (e) => {
+ e.preventDefault()
+ await supabase.auth.signInWithOAuth({
+ provider: 'google',
+ })
+ }
+
+ return (
+ <form onSubmit={handleLogin}>
+ <button>Sign up with Google</button>
+ </form>
+ )
+}
+```
+
+---
+
+```js src/supabaseClient.js
+import { createClient } from '@supabase/supabase-js' const supabaseUrl = process.env.REACT_APP_SUPABASE_URL const supabaseAnonKey = process.env.REACT_APP_SUPABASE_ANON_KEY
+export const supabase = createClient(supabaseUrl, supabaseAnonKey)
+```
+
+</CH.Code>
+
+</TabPanel>
+
+<TabPanel id="nextjs" label="NextJS" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/nextjs-icon.svg"/>}>
+
+```bash
+npx create-next-app@latest --ts --use-npm supabase-nextjs
+cd supabase-nextjs
+```
+
+</TabPanel>
+
+<TabPanel id="dart" label="Remix" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/remix-icon.svg"/>}>
+
+```bash
+npx create-next-app@latest --ts --use-npm supabase-nextjs
+cd supabase-nextjs
+```
+
+</TabPanel>
+
+<TabPanel id="js" label="Vanilla JS" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/javascript-icon.svg"/>}>
+
+```bash
+npm install @supabase/supabase-js
+```
+
+<CH.Code>
+
+```js script.js
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
+
+async function handleSubmit(event) {
+ event.preventDefault()
+ const { data, error } = await supabase.auth.signInWithOAuth({
+ provider: 'google',
+ })
+}
+```
+
+---
+
+```html index.html
+<form onSubmit="handleSubmit()">
+ <button>Sign up with Google</button>
+</form>
+```
+
+</CH.Code>
+
+</TabPanel>
+
+</Tabs>
+
+</div>
+
+</TabPanel>
+<TabPanel id="ts" label="TypeScript" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/typescript-icon.svg"/>}>
+
+```bash
+npx create-next-app@latest --ts --use-npm supabase-nextjs
+cd supabase-nextjs
+```
+
+</TabPanel>
+
+<TabPanel id="dart" label="Flutter" icon={<img className="m-0 w-4 h-4" src="/docs/img/icons/flutter-icon.svg"/>}>
+
+```bash
+npx create-next-app@latest --ts --use-npm supabase-nextjs
+cd supabase-nextjs
+```
+
+</TabPanel>
+
+</Tabs>
+
export const Page = ({ children }) => <Layout meta={meta} children={children} />
export default Page
diff --git a/apps/docs/pages/guides/auth/passwordless-login.mdx b/apps/docs/pages/guides/auth/passwordless-login.mdx
new file mode 100644
index 00000000000..f868649f0b3
--- /dev/null
+++ b/apps/docs/pages/guides/auth/passwordless-login.mdx
@@ -0,0 +1,85 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import { IconPanel, GlassPanel, IconMail } from 'ui'
+import Link from 'next/link'
+import { PhoneLoginsItems } from '~/components/Navigation/NavigationMenu/NavigationMenu.constants'
+
+export const meta = {
+ title: 'Passwordless login',
+ description: 'Logging in with social accounts',
+}
+
+## What is passwordless login?
+
+Passwordless login is a method of authentication that allows users to log in to a website or application without using a password. Instead of entering a password, the user may be asked to provide some other form of authentication, such as a one-time code sent via email or SMS, or by using a biometric factor like their fingerprint or facial recognition.
+
+Passwordless login can provide a more convenient and secure way to authenticate users compared to traditional password-based login. By eliminating the need for users to remember and enter complex passwords, passwordless login can reduce the risk of password-related security breaches, such as password reuse and weak passwords. It can also make it easier for users to log in to their accounts, which can improve the user experience and increase engagement with your application.
+
+There are several different methods of implementing passwordless login, and the specific steps and requirements may vary depending on the approach you choose. Some common methods include email or SMS-based one-time codes, biometric authentication, and magic links. You can learn more about these methods and how to implement passwordless login in your application by consulting the relevant documentation and tutorials.
+
+## What are the benefits of passwordless login?
+
+There are several benefits of implementing passwordless login in your applications, including:
+
+1. **Improved user experience**: By eliminating the need for users to remember and enter complex passwords, passwordless login can make it easier and more convenient for users to log in to your application. This can improve the overall user experience and make it more enjoyable for users to interact with your application.
+
+2. **Increased security**: Passwordless login can improve the security of your application by reducing the risk of password-related security breaches, such as password reuse and weak passwords. By using alternative forms of authentication, such as one-time codes or biometric factors, you can make it more difficult for unauthorized users to access your application.
+
+3. **Reduced support burden**: Passwordless login can also help reduce the support burden for your team by eliminating the need to reset forgotten passwords or deal with other password-related issues. This can free up your team to focus on other important tasks and improve the efficiency of your operation.
+
+4. **Increased registration and conversion rates**: By making the login process simpler and more convenient, passwordless login can also lead to increased registration and conversion rates for your application. This can help you attract more users and encourage them to take the desired actions within your application.
+
+Overall, passwordless login can provide a more convenient and secure way to authenticate users, improve the user experience, increase security, reduce the support burden, and increase registration and conversion rates.
+
+## Passwordless methods
+
+### Email One Time Password (OTP)
+
+Magic link passwordless login is a method of authentication that allows users to log in to a
+website or application without using a password. Instead of entering a password, the user is sent
+a "magic link" via email or SMS, which they can click or tap to log in to their account. You can
+follow our MagicLink guide to find out more about implementing this method.
+
+<div className="grid grid-cols-2 gap-12">
+
+</div>
+
+<div className="grid grid-cols-3 gap-10 not-prose py-8">
+ <Link href={`/auth/auth-magic-link`} passHref>
+ <a>
+ <IconPanel title={'Magic Link'} span="col-span-6" icon={
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-gold-1000">
+ <path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z" />
+ </svg>
+ }>
+
+ Learn about implenting Magic Link in your application
+
+ </IconPanel>
+ </a>
+ </Link>
+
+</div>
+
+### Phone SMS One Time Password (OTP)
+
+<div className="grid grid-cols-12 gap-10 not-prose py-8">
+ {PhoneLoginsItems.map((item) => (
+ <Link href={`/${item.url}`} key={item.name} passHref>
+ <a className="col-span-4">
+ <IconPanel
+ title={item.name}
+ span="col-span-6"
+ icon={item.icon}
+ isDarkMode={item.isDarkMode}
+ >
+ {item.linkDescription}
+ </IconPanel>
+ </a>
+ </Link>
+))}
+
+</div>
+
+export const Page = ({ children }) => <Layout meta={meta} children={children} />
+
+export default Page
diff --git a/apps/docs/pages/guides/auth/passwordless-login/email-otp-magic-link.mdx b/apps/docs/pages/guides/auth/passwordless-login/email-otp-magic-link.mdx
new file mode 100644
index 00000000000..23fb31a4e63
--- /dev/null
+++ b/apps/docs/pages/guides/auth/passwordless-login/email-otp-magic-link.mdx
@@ -0,0 +1,13 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import oldContent from '~/pages/guides/auth/auth-magic-link.mdx'
+
+export const meta = {}
+
+export const Page = ({ children }) => {
+ if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') {
+ return oldContent()
+ }
+ return <Layout meta={meta} children={children} />
+}
+
+export default Page
diff --git a/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-messagebird.mdx b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-messagebird.mdx
new file mode 100644
index 00000000000..14101c9aa77
--- /dev/null
+++ b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-messagebird.mdx
@@ -0,0 +1,13 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import oldContent from '~/pages/guides/auth/auth-messagebird.mdx'
+
+export const meta = {}
+
+export const Page = ({ children }) => {
+ if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') {
+ return oldContent()
+ }
+ return <Layout meta={meta} children={children} />
+}
+
+export default Page
diff --git a/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-twilio.mdx b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-twilio.mdx
new file mode 100644
index 00000000000..2776333bc65
--- /dev/null
+++ b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-twilio.mdx
@@ -0,0 +1,13 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import oldContent from '~/pages/guides/auth/auth-twilio.mdx'
+
+export const meta = {}
+
+export const Page = ({ children }) => {
+ if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') {
+ return oldContent()
+ }
+ return <Layout meta={meta} children={children} />
+}
+
+export default Page
diff --git a/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-vonage.mdx b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-vonage.mdx
new file mode 100644
index 00000000000..8402a573de0
--- /dev/null
+++ b/apps/docs/pages/guides/auth/passwordless-login/phone-sms-otp-vonage.mdx
@@ -0,0 +1,13 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import oldContent from '~/pages/guides/auth/auth-vonage.mdx'
+
+export const meta = {}
+
+export const Page = ({ children }) => {
+ if (process.env.NEXT_PUBLIC_NEW_DOCS === 'true') {
+ return oldContent()
+ }
+ return <Layout meta={meta} children={children} />
+}
+
+export default Page
diff --git a/apps/docs/pages/guides/auth/phone-login.mdx b/apps/docs/pages/guides/auth/phone-login.mdx
deleted file mode 100644
index bf87c09be81..00000000000
--- a/apps/docs/pages/guides/auth/phone-login.mdx
+++ /dev/null
@@ -1,41 +0,0 @@
-import Layout from '~/layouts/DefaultGuideLayout'
-import { IconPanel } from 'ui'
-import Link from 'next/link'
-import { PhoneLoginsItems } from '~/components/Navigation/NavigationMenu/NavigationMenu.constants'
-
-export const meta = {
- title: 'Login with social',
- description: 'Logging in with social accounts',
-}
-
-hello world
-
-asdsa
-
-dasd
-
-## adsd
-
-adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd adsdsddsadasd sdasdsdsadasdasdasdasdasd
-
-<div className="grid grid-cols-12 gap-10 not-prose py-16">
- {PhoneLoginsItems.map((item) => (
- <Link href={`/${item.url}`} key={item.name} passHref>
- <a className="col-span-4">
- <IconPanel
- title={item.name}
- span="col-span-6"
- icon={item.icon}
- isDarkMode={item.isDarkMode}
- >
- {item.description}
- </IconPanel>
- </a>
- </Link>
-))}
-
-</div>
-
-export const Page = ({ children }) => <Layout meta={meta} children={children} />
-
-export default Page
diff --git a/apps/docs/public/img/icons/typescript-icon.svg b/apps/docs/public/img/icons/typescript-icon.svg
new file mode 100644
index 00000000000..0abfb1b4b89
--- /dev/null
+++ b/apps/docs/public/img/icons/typescript-icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><rect width="36" height="36" x="6" y="6" fill="#1976d2"/><polygon fill="#fff" points="27.49,22 14.227,22 14.227,25.264 18.984,25.264 18.984,40 22.753,40 22.753,25.264 27.49,25.264"/><path fill="#fff" d="M39.194,26.084c0,0-1.787-1.192-3.807-1.192s-2.747,0.96-2.747,1.986 c0,2.648,7.381,2.383,7.381,7.712c0,8.209-11.254,4.568-11.254,4.568V35.22c0,0,2.152,1.622,4.733,1.622s2.483-1.688,2.483-1.92 c0-2.449-7.315-2.449-7.315-7.878c0-7.381,10.658-4.469,10.658-4.469L39.194,26.084z"/></svg>
\ No newline at end of file
diff --git a/apps/docs/public/img/icons/vonage-icon-light.svg b/apps/docs/public/img/icons/vonage-icon-light.svg
new file mode 100644
index 00000000000..f21da2bfbf4
--- /dev/null
+++ b/apps/docs/public/img/icons/vonage-icon-light.svg
@@ -0,0 +1,4 @@
+<svg width="66" height="58" viewBox="0 0 66 58" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 0H13.0127L25.4577 27.641L19.3007 42.182C19.1697 42.4877 18.6893 42.4877 18.5583 42.182L0 0Z" fill="#080808"/>
+<path d="M30.0427 49.911C32.7063 45.6753 52.662 0 52.662 0V0.0436627H65.9367C65.9367 0.0436627 46.3303 45.0203 43.9723 49.3433C41.92 53.1423 38.1647 57.4653 33.012 57.4653H21.091C21.0473 57.4653 21.0037 57.4217 21.0037 57.378C21.0037 57.3343 21.0037 57.2907 21.0473 57.2907C24.89 56.6793 26.9423 54.8017 30.0427 49.911Z" fill="#080808"/>
+</svg>
diff --git a/apps/docs/public/img/icons/vonage-icon.svg b/apps/docs/public/img/icons/vonage-icon.svg
index f21da2bfbf4..aa0e2c177f4 100644
--- a/apps/docs/public/img/icons/vonage-icon.svg
+++ b/apps/docs/public/img/icons/vonage-icon.svg
@@ -1,4 +1,4 @@
<svg width="66" height="58" viewBox="0 0 66 58" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 0H13.0127L25.4577 27.641L19.3007 42.182C19.1697 42.4877 18.6893 42.4877 18.5583 42.182L0 0Z" fill="#080808"/>
-<path d="M30.0427 49.911C32.7063 45.6753 52.662 0 52.662 0V0.0436627H65.9367C65.9367 0.0436627 46.3303 45.0203 43.9723 49.3433C41.92 53.1423 38.1647 57.4653 33.012 57.4653H21.091C21.0473 57.4653 21.0037 57.4217 21.0037 57.378C21.0037 57.3343 21.0037 57.2907 21.0473 57.2907C24.89 56.6793 26.9423 54.8017 30.0427 49.911Z" fill="#080808"/>
+<path d="M0 0H13.0127L25.4577 27.641L19.3007 42.182C19.1697 42.4877 18.6893 42.4877 18.5583 42.182L0 0Z" fill="white"/>
+<path d="M30.0429 49.911C32.7065 45.6753 52.6622 0 52.6622 0V0.0436627H65.9369C65.9369 0.0436627 46.3305 45.0203 43.9725 49.3433C41.9202 53.1423 38.1649 57.4653 33.0122 57.4653H21.0912C21.0475 57.4653 21.0039 57.4217 21.0039 57.378C21.0039 57.3343 21.0039 57.2907 21.0475 57.2907C24.8902 56.6793 26.9425 54.8017 30.0429 49.911Z" fill="white"/>
</svg>
diff --git a/packages/ui/src/components/GlassPanel/GlassPanel.tsx b/packages/ui/src/components/GlassPanel/GlassPanel.tsx
index 9b17b708798..1229df560da 100644
--- a/packages/ui/src/components/GlassPanel/GlassPanel.tsx
+++ b/packages/ui/src/components/GlassPanel/GlassPanel.tsx
@@ -30,6 +30,12 @@ const GlassPanel = ({
}: Props) => {
const { isDarkMode } = useTheme()
+ const IconBackground: React.FC = (props) => (
+ <div className={showIconBg && 'bg-green-600 w-8 h-8 flex items-center justify-center rounded'}>
+ {props.children}
+ </div>
+ )
+
return (
<div
className={[
@@ -70,21 +76,14 @@ const GlassPanel = ({
>
<div className="flex items-center gap-3">
{typeof icon === 'string' ? (
- showIconBg ? (
- <div className="bg-green-600 w-8 h-8 flex items-center justify-center rounded">
- <img
- className="w-5"
- src={`${icon}${hasLightIcon && !isDarkMode ? '-light' : ''}.svg`}
- />
- </div>
- ) : (
+ <IconBackground>
<img
className="w-5"
src={`${icon}${hasLightIcon && !isDarkMode ? '-light' : ''}.svg`}
/>
- )
+ </IconBackground>
) : (
- icon
+ <IconBackground>{icon}</IconBackground>
)}
<h5 className="text-base text-scale-1200">{title}</h5>
</div>
diff --git a/packages/ui/src/components/IconPanel/IconPanel.tsx b/packages/ui/src/components/IconPanel/IconPanel.tsx
index 58280b02071..6bf869052ff 100644
--- a/packages/ui/src/components/IconPanel/IconPanel.tsx
+++ b/packages/ui/src/components/IconPanel/IconPanel.tsx
@@ -4,75 +4,80 @@ import { ChevronRight } from 'react-feather'
interface Props {
title: string
- span?: string
+
icon?: string | React.ReactNode
children?: React.ReactNode
- header?: string
+
background?: boolean
- img?: string
+
hasLightIcon?: boolean
showLink?: boolean
-
- showIconBg?: boolean
}
const IconPanel = ({
title,
- span,
icon,
children,
- header,
background = true,
- img,
hasLightIcon,
showLink = false,
- showIconBg = false,
}: Props) => {
const { isDarkMode } = useTheme()
+ const IconContainer: React.FC = (props) => {
+ return (
+ <div
+ className={[
+ 'relative',
+ 'flex items-center justify-center shrink-0',
+ 'h-10 w-10 rounded-lg',
+ 'group',
+ 'cursor-pointer',
+ 'overflow-hidden',
+ 'border rounded-full',
+ background
+ ? 'border-scale-500 hover:border-scale-700 bg-white dark:bg-scale-300'
+ : 'border-scale-400 hover:border-scale-500 bg-transparent',
+ 'transition',
+ ].join(' ')}
+ >
+ {props.children}
+ </div>
+ )
+ }
+
return (
<div className={['relative', 'group'].join(' ')}>
<div className={['peer relative', 'flex flex-col', icon ? 'gap-6' : 'gap-2'].join(' ')}>
- <div className="flex items-center gap-3">
+ <div className={['flex gap-3', children ? 'items-start' : 'items-center'].join(' ')}>
{typeof icon === 'string' ? (
- <div
- className={[
- 'relative',
- 'flex items-center justify-center',
- 'h-10 w-10 rounded-lg',
- 'group',
- 'cursor-pointer',
- 'overflow-hidden',
- 'border rounded-full',
- background
- ? 'border-scale-500 hover:border-scale-700 bg-white dark:bg-scale-300'
- : 'border-scale-400 hover:border-scale-500 bg-transparent',
- 'transition',
- ].join(' ')}
- >
+ <IconContainer>
<img
className="w-5"
src={`${icon}${hasLightIcon && !isDarkMode ? '-light' : ''}.svg`}
/>
- </div>
+ </IconContainer>
) : (
- icon
+ <IconContainer>{icon}</IconContainer>
)}
- <h5 className="text-base text-scale-1200">{title}</h5>
- <div
- className="
+ <div className="flex flex-col gap-1">
+ <div className="flex items-center gap-3">
+ <h5 className="text-base text-scale-1200 m-0">{title}</h5>
+ <div
+ className="
transition-all ease-out -ml-1 opacity-0
text-scale-800
group-hover:opacity-100
group-hover:ml-0"
- >
- <ChevronRight strokeWidth={2} size={14} />
+ >
+ <ChevronRight strokeWidth={2} size={14} />
+ </div>
+ </div>
+ {children && <span className="text-sm text-scale-1100 not-prose">{children}</span>}
+ {showLink && <span className="text-brand-900 justify-end text-sm">Learn more</span>}
</div>
</div>
-
- {children && <span className="text-sm text-scale-1100">{children}</span>}
- {showLink && <span className="text-brand-900 justify-end text-sm">Learn more</span>}
</div>
<div
className="
diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.ts
index e14706669f2..eb33ab7ef96 100644
--- a/packages/ui/src/lib/theme/defaultTheme.ts
+++ b/packages/ui/src/lib/theme/defaultTheme.ts
@@ -386,7 +386,7 @@ export default {
...default__padding_and_text,
},
scrollable: `overflow-auto whitespace-nowrap no-scrollbar mask-fadeout-right`,
- content: `focus:outline-none focus:ring text-scale-900`,
+ content: `focus:outline-none`,
},
/*