feat: extension login ui

This commit is contained in:
steveschult
2023-11-20 00:30:38 +08:00
parent 4dab0453c6
commit c8e5629cd7
6 changed files with 74 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,43 @@
.container{
position: relative;
display: flex;
align-items: center;
flex-direction: column;
width: 300px;
height: 288px;
padding: 24px;
}
.welcome{
margin-top: 20px;
}
.btnContainer{
position: absolute;
display: flex;
bottom: 0px;
height: 100px;
width: 100%;
justify-content: center;
align-items: center;
flex-direction: column;
}
.loginBtn{
width: 70%;
height: 38px;
background: #262525;
color: #fff;
border-radius: 3px;
border: none;
cursor: pointer;
}
.loginBtn:hover {
background: #000000;
cursor: pointer;
}
.loginBtn:active {
background: #262525;
}

View File

@@ -0,0 +1,27 @@
import logo from '../../../assets/logo.png'
import styles from './login.module.css'
interface LoginProps {
loginCallback(): void
}
export function Login(props: LoginProps) {
const onLogin = () => {
console.log('onLogin')
props.loginCallback()
}
return (
<div className={styles.container}>
<div className={styles.welcome} style={{ marginTop: '20px' }}>
<img src={logo} width={100} alt="penx icon" />
<h1>Welcome</h1>
</div>
<div className={styles.btnContainer}>
<button className={styles.loginBtn} onClick={onLogin}>
Login to penx
</button>
</div>
</div>
)
}

View File

@@ -35,7 +35,7 @@
.saveBtn {
width: 150px;
height: 30px;
background: #9c27b0;
background: #262525;
color: #fff;
border-radius: 3px;
border: none;
@@ -43,10 +43,10 @@
}
.saveBtn:hover {
background: #bd21d8;
background: #000000;
cursor: pointer;
}
.saveBtn:active {
background: #da5ff0;
background: #262525;
}

View File

@@ -7,7 +7,7 @@ import styles from './main.module.css'
import './globals.css'
export function Main({ name = 'Extension' }) {
export function Main() {
const [tab, setTab] = useState<TabInfo>(null)
const getCurrentTab = async () => {