Skip to content

Commit 97c03fa

Browse files
committed
Add icons to navigation items and update layout options in various configurations
1 parent 0a9c991 commit 97c03fa

9 files changed

Lines changed: 40 additions & 19 deletions

File tree

apps/site/lib/layout.shared.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export function baseOptions(): BaseLayoutProps {
2626
text: 'Storybook',
2727
url: 'https://storybook.objectui.org',
2828
},
29+
{
30+
text: 'Demo',
31+
url: 'https://console.objectui.org',
32+
},
2933
],
3034
};
3135
}

examples/crm/objectstack.config.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default defineStack({
2424
App.create({
2525
name: 'crm_app',
2626
label: 'CRM',
27-
icon: 'users',
27+
icon: 'briefcase',
2828
navigation: [
2929
{
3030
id: 'nav_dashboard',
@@ -37,48 +37,56 @@ export default defineStack({
3737
id: 'nav_contacts',
3838
type: 'object',
3939
objectName: 'contact',
40-
label: 'Contacts'
40+
label: 'Contacts',
41+
icon: 'users'
4142
},
4243
{
4344
id: 'nav_accounts',
4445
type: 'object',
4546
objectName: 'account',
46-
label: 'Accounts'
47+
label: 'Accounts',
48+
icon: 'building-2'
4749
},
4850
{
4951
id: 'nav_opportunities',
5052
type: 'object',
5153
objectName: 'opportunity',
52-
label: 'Opportunities'
54+
label: 'Opportunities',
55+
icon: 'trending-up'
5356
},
5457
{
5558
id: 'nav_projects',
5659
type: 'object',
5760
objectName: 'project_task',
58-
label: 'Projects'
61+
label: 'Projects',
62+
icon: 'kanban-square'
5963
},
6064
{
6165
id: 'nav_events',
6266
type: 'object',
6367
objectName: 'event',
64-
label: 'Calendar'
68+
label: 'Calendar',
69+
icon: 'calendar'
6570
},
6671
{
6772
id: 'nav_sales',
6873
type: 'group',
6974
label: 'Sales',
75+
icon: 'banknote',
7076
children: [
7177
{
7278
id: 'nav_orders',
7379
type: 'object',
7480
objectName: 'order',
75-
label: 'Orders'
81+
label: 'Orders',
82+
icon: 'shopping-cart'
7683
},
7784
{
7885
id: 'nav_products',
7986
type: 'object',
8087
objectName: 'product',
81-
label: 'Products'
88+
label: 'Products',
89+
icon: 'package'
8290
}
8391
]
8492
}

examples/crm/src/objects/account.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
33
export const AccountObject = ObjectSchema.create({
44
name: 'account',
55
label: 'Account',
6-
icon: 'building',
6+
icon: 'building-2',
77
fields: {
88
name: Field.text({ label: 'Account Name', required: true, searchable: true }),
99
industry: Field.select(['Technology', 'Finance', 'Healthcare', 'Retail', 'Manufacturing'], { label: 'Industry' }),

examples/crm/src/objects/project.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
33
export const ProjectObject = ObjectSchema.create({
44
name: 'project_task',
55
label: 'Project Task',
6-
icon: 'clipboard-list',
6+
icon: 'kanban-square',
77
fields: {
88
name: Field.text({ label: 'Task Name', required: true, searchable: true }),
99
start_date: Field.date({ label: 'Start Date', required: true }),

examples/kitchen-sink/objectstack.config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,36 @@ export default defineStack({
1818
id: 'nav_kitchen_sink',
1919
type: 'object',
2020
objectName: 'kitchen_sink',
21-
label: 'Kitchen Sink'
21+
label: 'Kitchen Sink',
22+
icon: 'utensils'
2223
},
2324
{
2425
id: 'nav_dash',
2526
type: 'dashboard',
2627
dashboardName: 'sales_dashboard',
27-
label: 'Sales Overview'
28+
label: 'Sales Overview',
29+
icon: 'layout-dashboard'
2830
},
2931
{
3032
id: 'nav_help',
3133
type: 'page',
3234
pageName: 'help_page',
33-
label: 'Help & Resources'
35+
label: 'Help & Resources',
36+
icon: 'help-circle'
3437
},
3538
{
3639
id: 'nav_listview',
3740
type: 'page',
3841
pageName: 'list_view_demo',
39-
label: 'ListView Demo'
42+
label: 'ListView Demo',
43+
icon: 'table'
4044
},
4145
{
4246
id: 'nav_detailview',
4347
type: 'page',
4448
pageName: 'detail_view_demo',
45-
label: 'DetailView Demo'
49+
label: 'DetailView Demo',
50+
icon: 'file-text'
4651
}
4752
]
4853
})

examples/kitchen-sink/src/objects/kitchen_sink.object.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
33
export const KitchenSinkObject = ObjectSchema.create({
44
name: 'kitchen_sink',
55
label: 'Kitchen Sink',
6+
icon: 'utensils',
67
description: 'Shows all available field types for testing',
78
fields: {
89
// Basic Text

examples/msw-todo/objectstack.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ export default defineStack({
4646
id: 'group_tasks',
4747
type: 'group',
4848
label: 'Tasks',
49+
icon: 'list-todo',
4950
children: [
5051
{
5152
id: 'nav_tasks',
5253
type: 'object',
5354
objectName: 'task',
54-
label: 'My Tasks'
55+
label: 'My Tasks',
56+
icon: 'check-circle-2'
5557
}
5658
]
5759
}

examples/todo/objectstack.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ export default defineStack({
1313
icon: 'check-square',
1414
branding: {
1515
primaryColor: '#10B981',
16-
logo: '/assets/todo-logo.png',
1716
},
1817
navigation: [
1918
{
2019
id: 'group_tasks',
2120
type: 'group',
2221
label: 'Tasks',
22+
icon: 'list-todo',
2323
children: [
2424
{
2525
id: 'nav_todo_task',
2626
type: 'object',
2727
objectName: 'todo_task',
28-
label: 'My Tasks'
28+
label: 'My Tasks',
29+
icon: 'check-circle-2'
2930
}
3031
]
3132
}

examples/todo/src/domains/todo/task.object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
33
export const TodoTask = ObjectSchema.create({
44
name: 'todo_task',
55
label: 'Todo Task',
6-
icon: 'check-square',
6+
icon: 'check-circle-2',
77
titleFormat: '{subject}',
88
compactLayout: ['subject', 'due_date', 'priority', 'is_completed'],
99
enable: {

0 commit comments

Comments
 (0)