- My goal is to add a theme to my addon, and then pick which theme in my app.
- I based the idea from this blog post: https://jonpitcherella.com/2016/04/02/ember-theming/
What I've tried:
- added a theme-service in my addon
- added a theme-toggle component in my addon ('theme-toggle.js', 'theme-toggle.hbs', 'theme-toggle.scss' (with an underscore in front)
- added a themes.scss (as per the blog post)
- added both the component.scss file and the themes.scss file to my addon.scss file.
- injected the theme service into the route of the page in the dummy app:
theme: Ember.inject.service('theme-service'),
- added the component into a test page in the dummy app:
{{#theme-toggle data-theme="default-second"}}
<h1>I should be default-second</h1>
{{/theme-toggle}}
{{#theme-toggle data-theme="toolkit-light"}}
<h1>I should be toolkit-light</h1>
{{/theme-toggle}}
{{#theme-toggle}}
<h1>I should be what happens if you don't pick one</h1>
{{/theme-toggle}}
All three are rendering with the color defined in default-primary, even though the correct data-theme attribute values are rendering (default-secondary, toolkit-light, default-primary, respectively)
What am I missing? Feels like it should be super obvious.