Skip to content

Commit 07048a5

Browse files
fix(core): enforce usage of Icon type
1 parent 0328f14 commit 07048a5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/core/types/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { SetupStoreDefinition } from 'pinia'
22
import type { Component } from 'vue'
33
import type { NineLayoutTag } from '../utils/NineLayoutTag'
44
import type { Locale } from './locales'
5+
import type { Icon } from './theme'
56

67
import type { PluginId as FooterPluginId } from '@/plugins/footer'
78
import type { useFooterStore as FooterStore } from '@/plugins/footer/store'
@@ -182,7 +183,7 @@ export interface PluginContainer {
182183
* Icon class for the plugin.
183184
* This icon will be used as the default for rendering in menus.
184185
*/
185-
icon?: string
186+
icon?: Icon
186187

187188
/**
188189
* Whether the plugin is independently rendered.

src/core/types/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type Color = { oklch: OklchColor } | { rgba: RgbaColor } | string
4141
/**
4242
* An icon.
4343
*/
44-
export type Icon = `kern-icon--${string}`
44+
export type Icon = `kern-icon--${string}` | `kern-icon-fill--${string}`
4545

4646
/**
4747
* A theme for the POLAR map client.

0 commit comments

Comments
 (0)