-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7ff67d
commit 7e1f425
Showing
1 changed file
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = ''; | ||
} |