mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
feat: 更新登录和注册对话框组件
This commit is contained in:
parent
b2b4df1480
commit
a88c5f0d62
@ -1,5 +1,4 @@
|
||||
import { useState } from 'react';
|
||||
import { Dialog, DialogTitle, DialogDescription } from '~/components/ui/Dialog';
|
||||
import { Dialog, DialogTitle, DialogDescription, DialogRoot } from '~/components/ui/Dialog';
|
||||
import { Login } from '~/components/auth/Login';
|
||||
|
||||
interface LoginDialogProps {
|
||||
@ -9,15 +8,13 @@ interface LoginDialogProps {
|
||||
|
||||
export function LoginDialog({ isOpen, onClose }: LoginDialogProps) {
|
||||
return (
|
||||
<Dialog onClose={onClose}>
|
||||
{isOpen && (
|
||||
<>
|
||||
<DialogTitle>登录</DialogTitle>
|
||||
<DialogDescription>
|
||||
<Login />
|
||||
</DialogDescription>
|
||||
</>
|
||||
)}
|
||||
</Dialog>
|
||||
<DialogRoot open={isOpen}>
|
||||
<Dialog onBackdrop={onClose} onClose={onClose}>
|
||||
<DialogTitle>登录</DialogTitle>
|
||||
<DialogDescription>
|
||||
<Login />
|
||||
</DialogDescription>
|
||||
</Dialog>
|
||||
</DialogRoot>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { useState } from 'react';
|
||||
import { Dialog, DialogTitle, DialogDescription } from '~/components/ui/Dialog';
|
||||
import { Dialog, DialogTitle, DialogDescription, DialogRoot } from '~/components/ui/Dialog';
|
||||
import { Register } from '~/components/auth/Register';
|
||||
|
||||
interface RegisterDialogProps {
|
||||
@ -9,15 +8,13 @@ interface RegisterDialogProps {
|
||||
|
||||
export function RegisterDialog({ isOpen, onClose }: RegisterDialogProps) {
|
||||
return (
|
||||
<Dialog onClose={onClose}>
|
||||
{isOpen && (
|
||||
<>
|
||||
<DialogTitle>注册</DialogTitle>
|
||||
<DialogDescription>
|
||||
<Register />
|
||||
</DialogDescription>
|
||||
</>
|
||||
)}
|
||||
</Dialog>
|
||||
<DialogRoot open={isOpen}>
|
||||
<Dialog onBackdrop={onClose} onClose={onClose}>
|
||||
<DialogTitle>注册</DialogTitle>
|
||||
<DialogDescription>
|
||||
<Register />
|
||||
</DialogDescription>
|
||||
</Dialog>
|
||||
</DialogRoot>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user