FEATURE: Add contentCSSClass for sidebar section-link (#18555)
In some cases, like in the chat plugin for muted channels, we want to change the style of the sidebar content text. This adds a new contentCSSClass function to the BaseCustomSidebarSectionLink class and uses it in both sections and section-link to add the CSS class if it is provided.
This commit is contained in:
parent
e5b306b13e
commit
84f2529138
|
@ -33,7 +33,7 @@
|
|||
@prefixBadge={{@prefixBadge}}
|
||||
/>
|
||||
|
||||
<span class="sidebar-section-link-content-text">
|
||||
<span class={{concat-class "sidebar-section-link-content-text" @contentCSSClass}}>
|
||||
{{@content}}
|
||||
</span>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
@model={{link.model}}
|
||||
@models={{link.models}}
|
||||
@title={{link.title}}
|
||||
@contentCSSClass={{link.contentCSSClass}}
|
||||
@prefixColor={{link.prefixColor}}
|
||||
@prefixBadge={{link.prefixBadge}}
|
||||
@prefixType={{link.prefixType}}
|
||||
|
|
|
@ -45,6 +45,11 @@ export default class BaseCustomSidebarSectionLink {
|
|||
this._notImplemented();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string} CSS class for the content text
|
||||
*/
|
||||
get contentCSSClass() {}
|
||||
|
||||
/**
|
||||
* @returns {string} Prefix type for the link. Accepted value: icon, image, text
|
||||
*/
|
||||
|
@ -68,22 +73,22 @@ export default class BaseCustomSidebarSectionLink {
|
|||
/**
|
||||
* @returns {string} CSS class for prefix
|
||||
*/
|
||||
get PrefixCSSClass() {}
|
||||
get prefixCSSClass() {}
|
||||
|
||||
/**
|
||||
* @returns {string} Suffix type for the link. Accepted value: icon
|
||||
*/
|
||||
get SuffixType() {}
|
||||
get suffixType() {}
|
||||
|
||||
/**
|
||||
* @returns {string} Suffix value for the link. Accepted value: icon name
|
||||
*/
|
||||
get SuffixValue() {}
|
||||
get suffixValue() {}
|
||||
|
||||
/**
|
||||
* @returns {string} CSS class for suffix
|
||||
*/
|
||||
get SuffixCSSClass() {}
|
||||
get suffixCSSClass() {}
|
||||
|
||||
/**
|
||||
* @returns {string} Type of the hover button. Accepted value: icon
|
||||
|
|
Loading…
Reference in New Issue