mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Et2NumberReadonly: Right-align
This commit is contained in:
parent
2bdde5dc61
commit
7c1b156c2c
@ -206,7 +206,7 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
|
||||
{
|
||||
render = html`${this.value}`;
|
||||
}
|
||||
return render;
|
||||
return html`<span part="content" class="description--content">${render}</span>`;
|
||||
}
|
||||
|
||||
render()
|
||||
|
@ -10,20 +10,31 @@
|
||||
|
||||
import {Et2TextboxReadonly} from "./Et2TextboxReadonly";
|
||||
import {formatNumber} from "./Et2Number";
|
||||
import {property} from "lit/decorators/property.js";
|
||||
import {css} from "lit";
|
||||
|
||||
export class Et2NumberReadonly extends Et2TextboxReadonly
|
||||
{
|
||||
static get properties()
|
||||
static get styles()
|
||||
{
|
||||
return {
|
||||
...super.properties,
|
||||
/**
|
||||
* Precision of float number or 0 for integer
|
||||
*/
|
||||
precision: Number,
|
||||
}
|
||||
return [
|
||||
...(super.styles ? (Array.isArray(super.styles) ? super.styles : [super.styles]) : []),
|
||||
css`
|
||||
::slotted(*) {
|
||||
flex: 1 1 auto;
|
||||
text-align: right;
|
||||
padding-right: var(--sl-spacing-small);
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Precision of float number or 0 for integer
|
||||
*/
|
||||
@property({type: Number})
|
||||
precision;
|
||||
|
||||
set_value(val)
|
||||
{
|
||||
if(val === null)
|
||||
|
Loading…
Reference in New Issue
Block a user