Fix dynamic table button css

This commit is contained in:
John Livingston 2024-06-13 17:00:08 +02:00
parent b59056f57d
commit 1cc6a68089
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 41 additions and 2 deletions

View File

@ -298,6 +298,21 @@ livechat-dynamic-table-form {
text-align: left; text-align: left;
} }
.dynamic-table-add-row,
.dynamic-table-remove-row {
// Peertube rounded-line-height-1-5 mixins
line-height: $button-calc-line-height;
// Peertube peertube-button mixin (but with less horizontal padding)
padding: 4px;
border: 0;
font-weight: $font-semibold;
border-radius: 3px !important;
text-align: center;
cursor: pointer;
font-size: $button-font-size;
}
.dynamic-table-add-row { .dynamic-table-add-row {
background-color: var(--bs-green); background-color: var(--bs-green);
@ -328,6 +343,30 @@ livechat-dynamic-table-form {
.dynamic-table-remove-row { .dynamic-table-remove-row {
background-color: var(--bs-orange); background-color: var(--bs-orange);
&,
&:active,
&:focus {
color: #fff;
background-color: var(--mainColor);
}
&:focus,
&.focus-visible {
box-shadow: 0 0 0 0.2rem var(--mainHoverColor);
}
&:hover {
color: #fff;
background-color: var(--mainHoverColor);
}
&[disabled],
&.disabled {
cursor: default;
color: #fff;
background-color: var(--inputBorderColor);
}
} }
} }

View File

@ -269,7 +269,7 @@ export class DynamicTableFormElement extends LivechatElement {
rowData._originalIndex))} rowData._originalIndex))}
<td class="form-group"> <td class="form-group">
<button type="button" <button type="button"
class="peertube-button-link orange-button dynamic-table-remove-row" class="dynamic-table-remove-row"
.title=${ptTr(LOC_ACTION_REMOVE_ENTRY) as any} .title=${ptTr(LOC_ACTION_REMOVE_ENTRY) as any}
@click=${async () => this._removeRow(rowData._id)} @click=${async () => this._removeRow(rowData._id)}
> >
@ -288,7 +288,7 @@ export class DynamicTableFormElement extends LivechatElement {
<tr> <tr>
<td class="dynamic-table-add-row-cell"> <td class="dynamic-table-add-row-cell">
<button type="button" <button type="button"
class="peertube-button-link orange-button dynamic-table-add-row" class="dynamic-table-add-row"
.title=${ptTr(LOC_ACTION_ADD_ENTRY) as any} .title=${ptTr(LOC_ACTION_ADD_ENTRY) as any}
@click=${this._addRow} @click=${this._addRow}
> >