Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfries committed Jan 12, 2025
1 parent 89f7f07 commit cd98c71
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/dummy/app/controllers/application.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';

import type { Theme } from '@trusted-american/design-system/helpers/theme';

export default class ApplicationController extends Controller {
@tracked theme: Theme = 'light';

get isDarkTheme(): boolean {
return this.theme === 'dark';
}
set isDarkTheme(value: boolean) {
this.theme = value ? 'dark' : 'light';
}
}
2 changes: 2 additions & 0 deletions tests/dummy/app/controllers/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';

import type { Theme } from '@trusted-american/design-system/helpers/theme';

export default class HelpersController extends Controller {
date = new Date();

@tracked theme: Theme = 'light';

get isDarkTheme(): boolean {
Expand Down
7 changes: 7 additions & 0 deletions tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
/>
</:default>
<:footer>
<Form::Check
@value={{this.isDarkTheme}}
@label="Dark theme"
@identifier="isDarkTheme"
@isSwitch={{true}}
@onChange={{fn (mut this.isDarkTheme)}}
/>
</:footer>
</Aside>

Expand Down

0 comments on commit cd98c71

Please sign in to comment.