Skip to content

Commit d84e696

Browse files
Updated shell component examples to separate active flag as its own example
1 parent 412bdae commit d84e696

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ You see the [page layouts demo](./examples/layouts.sql) for a live example of th
12181218
"icon": "database",
12191219
"link": "/",
12201220
"menu_item": [
1221-
{"active": true, "title": "About", "submenu": [
1221+
{"title": "About", "submenu": [
12221222
{"link": "/safety.sql", "title": "Security", "icon": "lock"},
12231223
{"link": "/performance.sql", "title": "Performance", "icon": "bolt"},
12241224
{"link": "//github.com/sqlpage/SQLPage/blob/main/LICENSE.txt", "title": "License", "icon": "file-text"},
@@ -1264,6 +1264,22 @@ You see the [page layouts demo](./examples/layouts.sql) for a live example of th
12641264
"footer": "[Built with SQLPage](https://github.com/sqlpage/SQLPage/tree/main/examples/official-site)"
12651265
}]')),
12661266
('shell', '
1267+
This example shows how to set menu items as active in the navigation, so that they are highlighted in the nav bar.
1268+
1269+
In this example you can see that two menu items are created, "Home" and "About" and the "Home" tab is marked as active.
1270+
',
1271+
json('[{
1272+
"component": "shell",
1273+
"title": "SQLPage: SQL websites",
1274+
"icon": "database",
1275+
"link": "/",
1276+
"menu_item": [
1277+
{"title": "Home", "active": true},
1278+
{"title": "About"}
1279+
]
1280+
}]')),
1281+
1282+
('shell', '
12671283
### Sharing the shell between multiple pages
12681284
12691285
It is common to want to share the same shell between multiple pages.

0 commit comments

Comments
 (0)