auth-yes/ui/components/Layout.tsx

38 lines
1.7 KiB
TypeScript

export const Layout = ({
children,
title,
}: {
children: any;
title: string;
}) => {
return (
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title}</title>
<style>
{`
body { font-family: sans-serif; background: #f4f4f9; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
.container { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; max-width: 400px; }
h1 { font-size: 1.5rem; margin-bottom: 1rem; color: #333; text-align: center; }
input { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 0.75rem; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
button:hover { background: #0056b3; }
.error { color: red; font-size: 0.875rem; margin-top: 0.5rem; text-align: center; }
.success { color: green; font-size: 0.875rem; margin-top: 0.5rem; text-align: center; }
.links { margin-top: 1rem; text-align: center; font-size: 0.875rem; }
.links a { color: #007bff; text-decoration: none; }
.links a:hover { text-decoration: underline; }
`}
</style>
<script src="https://unpkg.com/@simplewebauthn/browser/dist/bundle/index.umd.min.js">
</script>
</head>
<body>
<div class="container">{children}</div>
</body>
</html>
);
};