Fix lit linting, WIP.
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2024 Mehdi Benadel <https://mehdibenadel.com>
|
||||
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { ptTr } from '../directives/translation'
|
||||
import { html } from 'lit'
|
||||
import { customElement, property } from 'lit/decorators.js'
|
||||
import { LivechatElement } from './livechat'
|
||||
@ -9,21 +11,28 @@ import { LivechatElement } from './livechat'
|
||||
@customElement('livechat-configuration-section-header')
|
||||
export class ConfigurationSectionHeaderElement extends LivechatElement {
|
||||
@property({ attribute: false })
|
||||
public override title: string = 'title'
|
||||
public label: string | ReturnType<typeof ptTr> = '???'
|
||||
|
||||
@property({ attribute: false })
|
||||
public description: string = 'Here\'s a description'
|
||||
public description?: string | ReturnType<typeof ptTr>
|
||||
|
||||
@property({ attribute: false })
|
||||
public helpPage: string = 'documentation'
|
||||
public helpPage?: string
|
||||
|
||||
protected override render = (): unknown => {
|
||||
return html`
|
||||
<h2>
|
||||
${this.title}
|
||||
<livechat-help-button .page=${this.helpPage}></livechat-help-button>
|
||||
${this.label}
|
||||
${
|
||||
this.helpPage === undefined
|
||||
? ''
|
||||
: html`<livechat-help-button .page=${this.helpPage}></livechat-help-button>`
|
||||
}
|
||||
</h2>
|
||||
<p>${this.description}</p>
|
||||
`
|
||||
${
|
||||
this.description === undefined
|
||||
? ''
|
||||
: html`<p>${this.description}</p>`
|
||||
}`
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user