Skip to content

Commit

Permalink
deprecate: correct typo on DataColorMode enum value
Browse files Browse the repository at this point in the history
  • Loading branch information
mlopezFC committed Oct 17, 2024
1 parent 2510d2e commit bfdb4f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,19 @@ public class BaseMarkdownComponent extends ReactAdapterComponent implements HasS
*
* <ul>
* <li>{@link #DARK}: Dark color scheme.
* <li>{@link #LIGTH}: Light color scheme.
* <li>{@link #LIGHT}: Light color scheme.
* <li>{@link #AUTO}: Automatically detects the color scheme based on the user's system settings.
* </ul>
*/
public enum DataColorMode {DARK,LIGTH,AUTO};
public enum DataColorMode {
DARK,
LIGHT,
/**
* @deprecated Use LIGHT instead
*/
@Deprecated
LIGTH,
AUTO};

/**
* Base constructor that receives the content of the markdown component.
Expand Down Expand Up @@ -85,6 +93,7 @@ public void setDataColorMode(DataColorMode mode) {
getElement().setAttribute("data-color-mode", "dark");
break;
case LIGTH:
case LIGHT:
getElement().setAttribute("data-color-mode", "light");
break;
case AUTO:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MarkdownEditorDemo() {
mde.setDataColorMode(DataColorMode.DARK);
break;
case "Light":
mde.setDataColorMode(DataColorMode.LIGTH);
mde.setDataColorMode(DataColorMode.LIGHT);
break;
case "Automatic":
mde.setDataColorMode(DataColorMode.AUTO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public MarkdownViewerDemo() {
mdv.setDataColorMode(DataColorMode.DARK);
break;
case "Light":
mdv.setDataColorMode(DataColorMode.LIGTH);
mdv.setDataColorMode(DataColorMode.LIGHT);
break;
case "Automatic":
mdv.setDataColorMode(DataColorMode.AUTO);
Expand Down

0 comments on commit bfdb4f9

Please sign in to comment.