Custom channel emoticons WIP (#130): fix CSS
This commit is contained in:
@ -46,7 +46,7 @@ export class ChannelEmojisElement extends LivechatElement {
|
||||
url: {
|
||||
colName: ptTr(LOC_LIVECHAT_EMOJIS_FILE),
|
||||
description: ptTr(LOC_LIVECHAT_EMOJIS_FILE_DESC),
|
||||
headerClassList: ['peertube-livechat-emojis-thead-file']
|
||||
headerClassList: ['peertube-livechat-emojis-col-file']
|
||||
}
|
||||
}
|
||||
const tableSchema: DynamicFormSchema = {
|
||||
@ -56,7 +56,8 @@ export class ChannelEmojisElement extends LivechatElement {
|
||||
},
|
||||
url: {
|
||||
inputType: 'image-file',
|
||||
default: ''
|
||||
default: '',
|
||||
colClassList: ['peertube-livechat-emojis-col-file']
|
||||
}
|
||||
}
|
||||
return this._asyncTaskRender.render({
|
||||
|
@ -70,6 +70,7 @@ interface CellDataSchema {
|
||||
separators?: string[]
|
||||
inputType?: DynamicTableAcceptedInputTypes
|
||||
default?: DynamicTableAcceptedTypes
|
||||
colClassList?: string[] // CSS classes to add to the <td> element.
|
||||
}
|
||||
|
||||
interface DynamicTableRowData {
|
||||
@ -460,7 +461,11 @@ export class DynamicTableFormElement extends LivechatElement {
|
||||
`with field type '${propertySchema.inputType as string}' for form entry '${propertyName.toString()}'.`)
|
||||
}
|
||||
|
||||
return html`<td class="form-group">${formElement}</td>`
|
||||
const classList = ['form-group']
|
||||
if (propertySchema.colClassList) {
|
||||
classList.push(...propertySchema.colClassList)
|
||||
}
|
||||
return html`<td class=${classList.join(' ')}>${formElement}</td>`
|
||||
}
|
||||
|
||||
_renderInput = (rowId: number,
|
||||
|
Reference in New Issue
Block a user