Skip to content

Commit

Permalink
refactor(ui5-text): match enum and file names (#10084)
Browse files Browse the repository at this point in the history
Match enum and file name - either use EmptyIndictaroMode for both, or TextEmptyIndictaroMode for both. As currently only the Text is known to have such mode - the change uses TextEmptyIndictaroMode for the enum and the file n
  • Loading branch information
ilhan007 authored Oct 25, 2024
1 parent c76b790 commit 036baa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/main/src/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getScopedVarName } from "@ui5/webcomponents-base/dist/CustomElementsSco
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
import willShowContent from "@ui5/webcomponents-base/dist/util/willShowContent.js";
import EmptyIndicatorMode from "./types/TextEmptyIndicatorMode.js";
import TextEmptyIndicatorMode from "./types/TextEmptyIndicatorMode.js";
// Template
import TextTemplate from "./generated/templates/TextTemplate.lit.js";

Expand Down Expand Up @@ -69,7 +69,7 @@ class Text extends UI5Element {
* @public
*/
@property()
emptyIndicatorMode: `${EmptyIndicatorMode}` = "Off";
emptyIndicatorMode: `${TextEmptyIndicatorMode}` = "Off";

/**
* Defines the text of the component.
Expand All @@ -90,7 +90,7 @@ class Text extends UI5Element {
}

get _renderEmptyIndicator() {
return !this.hasText && this.emptyIndicatorMode === EmptyIndicatorMode.On;
return !this.hasText && this.emptyIndicatorMode === TextEmptyIndicatorMode.On;
}

get _emptyIndicatorAriaLabel() {
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/types/TextEmptyIndicatorMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Empty Indicator Mode.
* @public
*/
enum EmptyIndicatorMode {
enum TextEmptyIndicatorMode {
/**
* Empty indicator is never rendered.
* @public
Expand All @@ -16,4 +16,4 @@ enum EmptyIndicatorMode {
On = "On",
}

export default EmptyIndicatorMode;
export default TextEmptyIndicatorMode;

0 comments on commit 036baa9

Please sign in to comment.