Is it possible to use a specific theme using Typescript code, like Bootstrap, specific for the NotificationService (used in an Angular NgRx effect)

1 Answer 41 Views
Notification
Evert Wiesenekker
Top achievements
Rank 2
Evert Wiesenekker asked on 13 Jun 2023, 03:16 PM

I know I need to define a specific style in package.json using:

"@progress/kendo-theme-default": "^6.3.0"

But I like to know if it is possible to target a specific style for a component. So (I realize this is maybe a weird question), component X uses the material theme and component Y the Bootstrap theme.

I am using your NotificationService in an NgRx effect by the way. So I would also be curious if this would be possible.

 

1 Answer, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 16 Jun 2023, 12:36 PM

Hi Evert,

Thanks for the provided information.

To set different Kendo Themes to different components, they must be scoped in some unique selectors in which the desired Kendo Theme can be imported. Keep in mind that this works only if the project is using SCSS.

I've created a short StackBlitz demo which demonstrates the said above:

https://stackblitz.com/edit/angular-scss-demo-m1wjcu?file=src%2Fstyles.scss

Hope this information helps.

Regards,
Stoyan
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Tags
Notification
Asked by
Evert Wiesenekker
Top achievements
Rank 2
Answers by
Stoyan
Telerik team
Share this question
or