This commit is contained in:
Lone Iversen
2023-04-13 15:00:18 +02:00
parent e38a3feea1
commit b4f141e7ab

View File

@@ -1,8 +1,11 @@
import { html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { html, nothing } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
import { UmbPropertyEditorExtensionElement } from '@umbraco-cms/backoffice/extensions-registry';
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
import type { DataTypePropertyPresentationModel } from '@umbraco-cms/backoffice/backend-api';
type umbracoDataValueType = 'STRING' | 'DECIMAL' | 'DATE/TIME' | 'TIME' | 'INTEGER' | 'BIG INTEGER' | 'LONG STRING';
/**
* @element umb-property-editor-ui-label
@@ -14,11 +17,20 @@ export class UmbPropertyEditorUILabelElement extends UmbLitElement implements Um
@property()
value = '';
@property()
description = '';
@state()
private _dvt?: umbracoDataValueType;
@property({ type: Array, attribute: false })
public config = [];
public set config(config: Array<DataTypePropertyPresentationModel>) {
const dvt = config.find((x) => x.alias === 'umbracoDataValueType');
if (dvt) this._dvt = dvt.value as umbracoDataValueType;
}
render() {
return html`<div>umb-property-editor-ui-label</div>`;
return nothing;
}
static styles = [UUITextStyles];