Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/PXS-6168 add premium theme #238

Merged
merged 11 commits into from
Jul 31, 2024

Conversation

shruti91sri
Copy link
Collaborator

@shruti91sri shruti91sri commented Jul 23, 2024

Added a dropdown to toggle between themes

Screen.Recording.2024-07-26.at.5.55.01.PM.mov

@shruti91sri shruti91sri marked this pull request as ready for review July 26, 2024 15:56
apps/golden-sample-app/project.json Outdated Show resolved Hide resolved
apps/golden-sample-app/src/app/app.module.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved

themes = ThemeService.THEMES;

onSelect(theme: any) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe theme: ThemeService.THEMES or string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well i set it to as onselect($event) is passed as parameter
i have to add object as well as it was throwing error that $event can be string or object and then checking in the function if it's a string then the logic follows

    if(typeof theme === 'string'){
      ThemeService.setTheme(theme);
      this.theme = theme;
    }
  }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this sounds like a better practice. string or Event type maybe?

Copy link
Contributor

@ycewe ycewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments left. LGTM

@shruti91sri shruti91sri merged commit c26b46e into main Jul 31, 2024
2 checks passed
@shruti91sri shruti91sri deleted the feature/PXS-6168-add-premium-theme branch July 31, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants