-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathindex.tsx
More file actions
76 lines (70 loc) · 2.04 KB
/
index.tsx
File metadata and controls
76 lines (70 loc) · 2.04 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
'use client'
import type { PayloadClientReactComponent, SanitizedConfig } from 'payload'
import { useConfig } from '@payloadcms/ui'
import LinkImport from 'next/link.js'
import React from 'react'
const Link = 'default' in LinkImport ? LinkImport.default : LinkImport
const baseClass = 'after-nav-links'
export const AfterNavLinks: PayloadClientReactComponent<
SanitizedConfig['admin']['components']['afterNavLinks'][0]
> = () => {
const {
config: {
routes: { admin: adminRoute },
},
} = useConfig()
return (
<div
className={baseClass}
id="after-nav-links-component"
style={{
backgroundColor: 'var(--theme-success-100)',
borderRadius: 'var(--style-radius-m)',
color: 'var(--theme-success-750)',
display: 'flex',
flexDirection: 'column',
marginTop: 'var(--base)',
padding: 'var(--base)',
width: '100%',
}}
>
<p style={{ marginBottom: '16px', marginTop: 0 }}>afterNavLinks</p>
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: '5px',
}}
>
<p className="nav__label" style={{ color: '#1565c0', margin: 0 }}>
Custom Routes
</p>
<p className="nav__link" style={{ margin: 0 }}>
<Link
href={`${adminRoute}/custom-default-view`}
style={{ color: '#1976d2', textDecoration: 'none' }}
>
Default Template
</Link>
</p>
<p className="nav__link" style={{ margin: 0 }}>
<Link
href={`${adminRoute}/custom-minimal-view`}
style={{ color: '#1976d2', textDecoration: 'none' }}
>
Minimal Template
</Link>
</p>
<p className="nav__link" style={{ margin: 0 }}>
<Link
href={`${adminRoute}/button-styles`}
style={{ color: '#1976d2', textDecoration: 'none' }}
>
Button Styles
</Link>
</p>
<div id="custom-css" />
</div>
</div>
)
}