Skip to content

Commit 36fcaf8

Browse files
feat: make title configurable
1 parent c748f09 commit 36fcaf8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plugin.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const DashboardIcon = () => (
2525
)
2626

2727
export interface DashboardPluginConfig {
28+
title?: string
2829
widgets?: DashboardWidget[]
2930

3031
/**
@@ -38,14 +39,16 @@ export const dashboardTool = definePlugin<DashboardPluginConfig>((config = {}) =
3839
layout: config.defaultLayout ?? {},
3940
widgets: config.widgets ?? [],
4041
}
42+
43+
const title = config.title ?? 'Dashboard'
4144

4245
return {
4346
name: 'dashboard',
4447
tools: (prev, context) => {
4548
return [
4649
...prev,
4750
{
48-
title: 'Dashboard',
51+
title,
4952
name: 'dashboard',
5053
icon: DashboardIcon,
5154
component: () => <Dashboard config={pluginConfig} />,

0 commit comments

Comments
 (0)