@@ -48,41 +48,40 @@ export default definePlugin({
4848
4949function CustomPage ( ) {
5050 const { router, notifications } = useAppContext ( ) ;
51- const layout = useAppLayout ( ) ;
5251
5352 return (
5453 < div style = { { fontFamily : 'system-ui, sans-serif' , padding : 24 } } >
5554 { /* Toolbar - includes plugin components from other plugins! */ }
56- < AppHeader toolbar = { layout . toolbar } />
55+ < AppHeader />
5756
58- < div style = { { padding : '16px 0' , marginBottom : 24 , borderBottom : '2px solid #e2e8f0' } } >
59- < h1 style = { { margin : 0 , fontSize : 28 , color : '#1e293b' } } >
57+ < div style = { { padding : '16px 0' , marginBottom : 24 , borderBottom : '2px solid var(--border-color, #e2e8f0) ' } } >
58+ < h1 style = { { margin : 0 , fontSize : 28 , color : 'var(--text-primary, #1e293b) ' } } >
6059 📄 My Custom Page
6160 </ h1 >
62- < p style = { { margin : '8px 0 0' , color : '#64748b' } } >
61+ < p style = { { margin : '8px 0 0' , color : 'var(--text-secondary, #64748b) ' } } >
6362 This page was added by a plugin!
6463 </ p >
6564 </ div >
6665
6766 < div style = { { display : 'flex' , flexDirection : 'column' , gap : 24 } } >
68- < section style = { { padding : 24 , background : '#f8fafc' , borderRadius : 12 } } >
69- < h2 style = { { marginTop : 0 , fontSize : 20 } } > Welcome to the Custom Page</ h2 >
70- < p style = { { color : '#475569' , lineHeight : 1.6 } } >
67+ < section style = { { padding : 24 , background : 'var(--card-bg, #f8fafc) ' , borderRadius : 12 } } >
68+ < h2 style = { { marginTop : 0 , fontSize : 20 , color : 'var(--text-primary, inherit)' } } > Welcome to the Custom Page</ h2 >
69+ < p style = { { color : 'var(--text-secondary, #475569) ' , lineHeight : 1.6 } } >
7170 This entire page was registered by the < strong > Custom Page Plugin</ strong > .
7271 The plugin used the < code > context.router.registerRoute()</ code > API during
7372 its activation phase.
7473 </ p >
75- < p style = { { color : '#475569' , lineHeight : 1.6 } } >
74+ < p style = { { color : 'var(--text-secondary, #475569) ' , lineHeight : 1.6 } } >
7675 When the plugin is deactivated or removed, this route is automatically
7776 cleaned up and the page becomes inaccessible.
7877 </ p >
7978 </ section >
8079
81- < section style = { { padding : 24 , background : '#eff6ff' , borderRadius : 12 , border : '1px solid #bfdbfe' } } >
82- < h3 style = { { marginTop : 0 , fontSize : 18 , color : '#1e40af' } } >
80+ < section style = { { padding : 24 , background : 'var(--card-bg-secondary, #eff6ff) ' , borderRadius : 12 , border : '1px solid var(--border-accent, #bfdbfe) ' } } >
81+ < h3 style = { { marginTop : 0 , fontSize : 18 , color : 'var(--text-accent, #1e40af) ' } } >
8382 🎯 Plugin Capabilities Demo
8483 </ h3 >
85- < ul style = { { color : '#1e40af' , lineHeight : 1.8 } } >
84+ < ul style = { { color : 'var(--text-accent, #1e40af) ' , lineHeight : 1.8 } } >
8685 < li > Custom routes with full React components</ li >
8786 < li > Access to the application context (router, notifications, etc.)</ li >
8887 < li > Proper lifecycle management (activate/deactivate)</ li >
@@ -91,8 +90,8 @@ function CustomPage() {
9190 </ ul >
9291 </ section >
9392
94- < section style = { { padding : 24 , background : '#fff' , borderRadius : 12 , border : '1px solid #e2e8f0' } } >
95- < h3 style = { { marginTop : 0 , fontSize : 18 } } > Try These Actions</ h3 >
93+ < section style = { { padding : 24 , background : 'var(--bg-primary, #fff) ' , borderRadius : 12 , border : '1px solid var(--border-color, #e2e8f0) ' } } >
94+ < h3 style = { { marginTop : 0 , fontSize : 18 , color : 'var(--text-primary, inherit)' } } > Try These Actions</ h3 >
9695 < div style = { { display : 'flex' , gap : 12 , flexWrap : 'wrap' } } >
9796 < button
9897 onClick = { ( ) => {
@@ -102,11 +101,11 @@ function CustomPage() {
102101 style = { {
103102 padding : '10px 20px' ,
104103 borderRadius : 6 ,
105- border : '1px solid #cbd5e1' ,
106- background : '#f8fafc' ,
104+ border : '1px solid var(--border-color, #cbd5e1) ' ,
105+ background : 'var(--card-bg, #f8fafc) ' ,
107106 cursor : 'pointer' ,
108107 fontSize : 14 ,
109- color : '#334155' ,
108+ color : 'var(--text-primary, #334155) ' ,
110109 } }
111110 >
112111 🏠 Go to Home
@@ -119,11 +118,11 @@ function CustomPage() {
119118 style = { {
120119 padding : '10px 20px' ,
121120 borderRadius : 6 ,
122- border : '1px solid #cbd5e1' ,
123- background : '#f8fafc' ,
121+ border : '1px solid var(--border-color, #cbd5e1) ' ,
122+ background : 'var(--card-bg, #f8fafc) ' ,
124123 cursor : 'pointer' ,
125124 fontSize : 14 ,
126- color : '#334155' ,
125+ color : 'var(--text-primary, #334155) ' ,
127126 } }
128127 >
129128 ⚙ Go to Settings
@@ -135,11 +134,11 @@ function CustomPage() {
135134 style = { {
136135 padding : '10px 20px' ,
137136 borderRadius : 6 ,
138- border : '1px solid #3b82f6' ,
139- background : '#eff6ff' ,
137+ border : '1px solid var(--border-accent, #3b82f6) ' ,
138+ background : 'var(--card-bg-secondary, #eff6ff) ' ,
140139 cursor : 'pointer' ,
141140 fontSize : 14 ,
142- color : '#1e40af' ,
141+ color : 'var(--text-accent, #1e40af) ' ,
143142 } }
144143 >
145144 💬 Show Notification
@@ -182,21 +181,21 @@ function CustomPageSettings() {
182181 const { router } = useAppContext ( ) ;
183182
184183 return (
185- < section style = { { padding : 16 , background : '#f8fafc' , borderRadius : 8 } } >
186- < h3 style = { { marginTop : 0 , fontSize : 16 } } > Custom Page Plugin</ h3 >
187- < p style = { { color : '#64748b' , fontSize : 14 , marginBottom : 12 } } >
184+ < section style = { { padding : 16 , background : 'var(--card-bg, #f8fafc) ' , borderRadius : 8 } } >
185+ < h3 style = { { marginTop : 0 , fontSize : 16 , color : 'var(--text-primary, inherit)' } } > Custom Page Plugin</ h3 >
186+ < p style = { { color : 'var(--text-secondary, #64748b) ' , fontSize : 14 , marginBottom : 12 } } >
188187 This plugin adds a custom page to the application.
189188 </ p >
190189 < button
191190 onClick = { ( ) => router . navigate ( '/my-custom-page' ) }
192191 style = { {
193192 padding : '8px 16px' ,
194193 borderRadius : 6 ,
195- border : '1px solid #3b82f6' ,
196- background : '#eff6ff' ,
194+ border : '1px solid var(--border-accent, #3b82f6) ' ,
195+ background : 'var(--card-bg-secondary, #eff6ff) ' ,
197196 cursor : 'pointer' ,
198197 fontSize : 13 ,
199- color : '#1e40af' ,
198+ color : 'var(--text-accent, #1e40af) ' ,
200199 } }
201200 >
202201 📄 Visit Custom Page
0 commit comments