From d33d629e7ee90483a09ae80892560baa96d62977 Mon Sep 17 00:00:00 2001 From: Oli Evans Date: Thu, 2 Feb 2023 15:25:22 +0000 Subject: [PATCH] feat: club tropical w3 auth boxen Nice up the auth step to be closer to the dream presented in https://beta.ui.web3.storage/keyring While implementing this it occurs to me that we should drop the Authneticator pattern in-favour of the "come on in" pattern. The app should just work straight away without forcing you to register your first space per https://github.com/web3-storage/w3ui/issues/349 License: MIT Signed-off-by: Oli Evans --- examples/react/w3console/public/w3.svg | 4 ++++ examples/react/w3console/src/app.tsx | 2 +- examples/react/w3console/src/index.css | 21 +++++++++++++++++++++ packages/react/src/Authenticator.tsx | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 examples/react/w3console/public/w3.svg diff --git a/examples/react/w3console/public/w3.svg b/examples/react/w3console/public/w3.svg new file mode 100644 index 00000000..977174e1 --- /dev/null +++ b/examples/react/w3console/public/w3.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/react/w3console/src/app.tsx b/examples/react/w3console/src/app.tsx index 1b29e367..b1bc7fff 100644 --- a/examples/react/w3console/src/app.tsx +++ b/examples/react/w3console/src/app.tsx @@ -148,7 +148,7 @@ export function App (): JSX.Element { -
+
diff --git a/examples/react/w3console/src/index.css b/examples/react/w3console/src/index.css index a90f0749..930f5e81 100644 --- a/examples/react/w3console/src/index.css +++ b/examples/react/w3console/src/index.css @@ -2,3 +2,24 @@ @tailwind components; @tailwind utilities; + +.w3ui-authenticator { + background-image: url("w3.svg"); + background-repeat: no-repeat; + background-position: center 95%; + @apply bg-gray-900; +} + +.w3ui-authenticator-form { + background: linear-gradient(104.3deg,#3064e0 -8.21%,#00d8ff 88.68%); + @apply shadow-md px-10 pt-14 pb-8 rounded-xl; +} + +.w3ui-authenticator-form .email-field label { + @apply text-white font-semibold uppercase text-xs tracking-wider m-1 font-mono opacity-80; +} + +.w3ui-authenticator-form .email-field input { + width: 22rem; + @apply bg-white rounded-md shadow-md +} \ No newline at end of file diff --git a/packages/react/src/Authenticator.tsx b/packages/react/src/Authenticator.tsx index ceef34c7..1dfb3be7 100644 --- a/packages/react/src/Authenticator.tsx +++ b/packages/react/src/Authenticator.tsx @@ -7,7 +7,7 @@ export function AuthenticationForm (): JSX.Element { return (
- +