Skip to content

Commit 3baaf69

Browse files
docs(ui): docs improvement
1 parent 4f9cf39 commit 3baaf69

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

package-lock.json

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
"rxjs": "~7.8.0",
4646
"tailwind-variants": "^1.0.0",
4747
"tailwindcss": "^4.1.11",
48-
"tslib": "^2.3.0",
49-
"tw-animate-css": "^1.3.7"
48+
"tslib": "^2.3.0"
5049
},
5150
"devDependencies": {
5251
"@angular/build": "^20.1.3",
@@ -63,6 +62,7 @@
6362
"karma-jasmine": "~5.1.0",
6463
"karma-jasmine-html-reporter": "~2.1.0",
6564
"ng-packagr": "^20.1.0",
65+
"tw-animate-css": "^1.3.8",
6666
"typescript": "~5.8.2"
6767
}
6868
}

projects/docs/src/app/shared/components/sidebar/sidebar.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export class Sidebar {
2828
// Two-way binding model signal for menu state
2929
readonly menuOpen = model(false);
3030

31+
// Sort method for components
32+
private sortComponents(components: NavLink[]): NavLink[] {
33+
return components.sort((a, b) => a.name.localeCompare(b.name));
34+
}
35+
3136
// Clean navigation structure
3237
readonly sections = signal<NavSection[]>([
3338
{
@@ -43,7 +48,7 @@ export class Sidebar {
4348
{
4449
title: 'Components',
4550
link: 'components',
46-
links: [
51+
links: this.sortComponents([
4752
{ name: 'Accordion', path: 'accordion' },
4853
{ name: 'Alert', path: 'alert' },
4954
{ name: 'Alert Dialog', path: 'alert-dialog' },
@@ -70,7 +75,7 @@ export class Sidebar {
7075
{ name: 'Toggle', path: 'toggle' },
7176
{ name: 'Toggle Group', path: 'toggle-group' },
7277
{ name: 'Skeleton', path: 'skeleton' }
73-
]
78+
])
7479
}
7580
]);
7681

0 commit comments

Comments
 (0)