Skip to content

Commit

Permalink
wc: Add capitalization for the first letter of the title modal #TASK-…
Browse files Browse the repository at this point in the history
…5060
  • Loading branch information
Rodielm committed Sep 26, 2023
1 parent a6bcf92 commit 53104fe
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/webcomponents/commons/modal/modal-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,20 @@ export default class ModalUtils {
}

static #getTitleHeader(header, title, classes, style) {
const titleCap = UtilsNew.capitalize(title);
switch (header) {
case "h1":
return html`<h1 class="${classes}" style="${style}">${title}</h1>`;
return html`<h1 class="${classes}" style="${style}">${titleCap}</h1>`;
case "h2":
return html`<h2 class="${classes}" style="${style}">${title}</h2>`;
return html`<h2 class="${classes}" style="${style}">${titleCap}</h2>`;
case "h3":
return html`<h3 class="${classes}" style="${style}">${title}</h3>`;
return html`<h3 class="${classes}" style="${style}">${titleCap}</h3>`;
case "h4":
return html`<h4 class="${classes}" style="${style}">${title}</h4>`;
return html`<h4 class="${classes}" style="${style}">${titleCap}</h4>`;
case "h5":
return html`<h5 class="${classes}" style="${style}">${title}</h5>`;
return html`<h5 class="${classes}" style="${style}">${titleCap}</h5>`;
case "h6":
return html`<h6 class="${classes}" style="${style}">${title}</h6>`;
return html`<h6 class="${classes}" style="${style}">${titleCap}</h6>`;
}
}

Expand Down

0 comments on commit 53104fe

Please sign in to comment.