terrier-engine 4.72.0 → 4.72.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/terrier/tabs.ts +8 -1
package/package.json
CHANGED
package/terrier/tabs.ts
CHANGED
|
@@ -14,11 +14,13 @@ export type TabParams = {
|
|
|
14
14
|
key: string
|
|
15
15
|
title: string
|
|
16
16
|
icon?: IconName
|
|
17
|
+
iconColor?: ColorName
|
|
17
18
|
state?: 'enabled' | 'disabled' | 'hidden'
|
|
18
19
|
classes?: string[]
|
|
19
20
|
tabClasses?: string[]
|
|
20
21
|
click?: Packet
|
|
21
|
-
|
|
22
|
+
secondaryIcon?: IconName
|
|
23
|
+
secondaryIconColor?: ColorName
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -201,6 +203,11 @@ export class TabContainerPart extends TerrierPart<TabContainerState> {
|
|
|
201
203
|
if (tab.key === currentTabKey) a.class('active')
|
|
202
204
|
if (tab.icon) this.theme.renderIcon(a, tab.icon, tab.iconColor ? tab.iconColor : 'secondary')
|
|
203
205
|
a.span({ text: tab.title })
|
|
206
|
+
if (tab.secondaryIcon) {
|
|
207
|
+
a.span('.tt-tab-secondary-icon', span => {
|
|
208
|
+
this.theme.renderIcon(span, tab.secondaryIcon!, tab.secondaryIconColor ? tab.secondaryIconColor : 'secondary')
|
|
209
|
+
})
|
|
210
|
+
}
|
|
204
211
|
a.emitClick(this.changeTabKey, { tabKey: tab.key })
|
|
205
212
|
if (tab.click) a.emitClick(tab.click.key, tab.click.data || {})
|
|
206
213
|
})
|