mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 20:21:21 +00:00
🎨 styles: modal authen
:%s
This commit is contained in:
parent
a3170ee04d
commit
8dccc7a9c0
@ -5,7 +5,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0.8rem 3.2rem;
|
padding: 1rem 2rem;
|
||||||
|
@screen md {
|
||||||
|
padding: 0.8rem 3.2rem;
|
||||||
|
}
|
||||||
&:disabled {
|
&:disabled {
|
||||||
filter: brightness(0.9);
|
filter: brightness(0.9);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
@ -76,9 +79,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.large {
|
&.large {
|
||||||
padding: 1.6rem 4.8rem;
|
padding: 1rem 1.5rem;
|
||||||
&.onlyIcon {
|
&.onlyIcon {
|
||||||
padding: 1.6rem;
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
@screen md {
|
||||||
|
padding: 1.6rem 4.8rem;
|
||||||
|
&.onlyIcon {
|
||||||
|
padding: 1.6rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.loading {
|
&.loading {
|
||||||
&::before {
|
&::before {
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
.formAuthenticate {
|
.formAuthenticate {
|
||||||
@apply overflow-hidden;
|
@apply overflow-hidden;
|
||||||
.inner {
|
.inner {
|
||||||
@apply grid grid-cols-2 overflow-hidden;
|
@apply grid grid-cols-2 overflow-hidden transition-all duration-200;
|
||||||
width: 200%;
|
width: 200%;
|
||||||
|
&.register {
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import classNames from 'classnames'
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import ModalCommon from '../ModalCommon/ModalCommon'
|
import ModalCommon from '../ModalCommon/ModalCommon'
|
||||||
import FormLogin from './components/FormLogin/FormLogin'
|
import FormLogin from './components/FormLogin/FormLogin'
|
||||||
@ -19,7 +20,10 @@ const ModalAuthenticate = ({ visible, closeModal }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<ModalCommon visible={visible} onClose={closeModal} title={isLogin ? 'Sign In' : 'Create Account'}>
|
<ModalCommon visible={visible} onClose={closeModal} title={isLogin ? 'Sign In' : 'Create Account'}>
|
||||||
<section className={s.formAuthenticate}>
|
<section className={s.formAuthenticate}>
|
||||||
<div className={s.inner}>
|
<div className={classNames({
|
||||||
|
[s.inner]: true,
|
||||||
|
[s.register]: !isLogin,
|
||||||
|
})}>
|
||||||
<FormLogin isHide={!isLogin} onSwitch={onSwitch} />
|
<FormLogin isHide={!isLogin} onSwitch={onSwitch} />
|
||||||
<FormRegister isHide={isLogin} onSwitch={onSwitch} />
|
<FormRegister isHide={isLogin} onSwitch={onSwitch} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.formAuthen {
|
.formAuthen {
|
||||||
@apply transition-all duration-200 bg-white w-full;
|
@apply bg-white w-full;
|
||||||
.inner {
|
.inner {
|
||||||
@screen md {
|
@screen md {
|
||||||
max-width: 52rem;
|
max-width: 52rem;
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
.hide {
|
|
||||||
transform: translateX(-200%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
@apply flex justify-between items-center;
|
@apply flex justify-between items-center;
|
||||||
margin: 4rem auto;
|
margin: 4rem auto;
|
||||||
|
@ -25,7 +25,7 @@ const FormLogin = ({ onSwitch, isHide }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<section className={classNames({
|
<section className={classNames({
|
||||||
[s.formAuthen]: true,
|
[s.formAuthen]: true,
|
||||||
[styles.hide]: isHide
|
// [styles.hide]: isHide
|
||||||
})}>
|
})}>
|
||||||
<div className={s.inner}>
|
<div className={s.inner}>
|
||||||
<div className={s.body}>
|
<div className={s.body}>
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
@import '../../../../../styles/utilities';
|
@import "../../../../../styles/utilities";
|
||||||
|
|
||||||
.formRegister {
|
.formRegister {
|
||||||
transform: translateX(-100%);
|
|
||||||
&.hide {
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
.passwordNote {
|
.passwordNote {
|
||||||
@apply text-center caption text-label;
|
@apply text-center caption text-label;
|
||||||
margin-top: 0.8rem;
|
margin-top: 0.8rem;
|
||||||
}
|
}
|
||||||
.bottom {
|
.bottom {
|
||||||
@ -17,4 +13,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,11 +24,11 @@ const FormRegister = ({ onSwitch, isHide }: Props) => {
|
|||||||
<section className={classNames({
|
<section className={classNames({
|
||||||
[s.formAuthen]: true,
|
[s.formAuthen]: true,
|
||||||
[styles.formRegister]: true,
|
[styles.formRegister]: true,
|
||||||
[styles.hide]: isHide
|
// [styles.hide]: isHide
|
||||||
})}>
|
})}>
|
||||||
<div className={s.inner}>
|
<div className={s.inner}>
|
||||||
<div className={s.body}>
|
<div className={s.body}>
|
||||||
<Inputcommon placeholder='Email Address' type='email' />
|
<Inputcommon placeholder='Email Address' type='email' ref={emailRef}/>
|
||||||
<Inputcommon placeholder='Password' type='password' />
|
<Inputcommon placeholder='Password' type='password' />
|
||||||
<div className={styles.passwordNote}>
|
<div className={styles.passwordNote}>
|
||||||
Must contain 8 characters with at least 1 uppercase and 1 lowercase letter and either 1 number or 1 special character.
|
Must contain 8 characters with at least 1 uppercase and 1 lowercase letter and either 1 number or 1 special character.
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
@apply relative text-center;
|
@apply relative text-center;
|
||||||
margin-bottom: 4rem;
|
margin-bottom: 4rem;
|
||||||
span {
|
span {
|
||||||
@apply bg-white uppercase text-label caption;
|
@apply relative bg-white uppercase text-label caption;
|
||||||
padding: 0 0.8rem;
|
padding: 0 0.8rem;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
&::after {
|
&::after {
|
||||||
@apply absolute bg-line;
|
@apply absolute bg-line;
|
||||||
@ -14,6 +15,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -26,7 +28,7 @@
|
|||||||
@apply hidden;
|
@apply hidden;
|
||||||
@screen md {
|
@screen md {
|
||||||
@apply inline-block;
|
@apply inline-block;
|
||||||
margin-left: .8rem;
|
margin-left: 0.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user