forked from components-ai/css.gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLayout.tsx
More file actions
57 lines (56 loc) · 1.38 KB
/
Layout.tsx
File metadata and controls
57 lines (56 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { HTMLAttributes, useId } from 'react'
import Link from 'next/link'
import { Logo } from '@compai/logo'
import pkg from '../../../packages/gui/package.json'
interface Props extends HTMLAttributes<HTMLDivElement> {}
export const Layout = (props: Props) => {
const id = useId()
return (
<>
<header
sx={{
fontFamily: 'body',
borderBottom: 'thin solid',
borderColor: 'border',
px: [2, 3, 3],
py: 3,
position: 'sticky',
width: '100%',
backgroundColor: 'background',
zIndex: 999,
top: 0,
}}
>
<Link href="/home" passHref={true}>
<a
sx={{
fontWeight: 500,
color: 'text',
textDecoration: 'none',
display: 'flex',
alignItems: 'center',
}}
>
<span sx={{ mr: 4 }}>
<Logo height={20} width={20} seed={id} />
</span>
<span>
CSS GUI
<span sx={{ fontSize: 0, color: 'muted', ml: 1 }}>
v{pkg.version}
</span>
</span>
</a>
</Link>
</header>
<div
sx={{
fontFamily: 'body',
display: 'flex',
flexDirection: ['column', 'row'],
}}
{...props}
/>
</>
)
}