Skip to content

Commit

Permalink
add docs to UmbLitElement
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Aug 11, 2023
1 parent a7ff67d commit 7e1f425
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/shared/lit-element/lit-element.element.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
import { LitElement, property } from '@umbraco-cms/backoffice/external/lit';
import { UmbElementMixin } from '@umbraco-cms/backoffice/element-api';

/**
* The base class for all Umbraco LitElement elements.
*
* @abstract
* @remarks This class is a wrapper around the LitElement class.
* @remarks The `dir` and `lang` properties are defined here as reactive properties so they react to language changes.
*/
export class UmbLitElement extends UmbElementMixin(LitElement) {
// Make `dir` and `lang` reactive properties so they react to language changes:
@property() dir = '';
/**
* The direction of the element.
*
* @attr
* @remarks This is the direction of the element, not the direction of the backoffice.
* @example 'ltr'
* @example 'rtl'
*/
@property() dir: 'rtl' | 'ltr' | '' = '';

/**
* The language of the element.
*
* @attr
* @remarks This is the language of the element, not the language of the backoffice.
* @example 'en-us'
* @example 'en'
*/
@property() lang = '';
}

0 comments on commit 7e1f425

Please sign in to comment.