Skip to content

Commit 1bf720e

Browse files
committed
added yielding of theme value in the named blocks of the ComparisonGrid
1 parent 0f87f53 commit 1bf720e

File tree

1 file changed

+5
-4
lines changed
  • showcase/app/components/shw/carbonization/comparison-grid

1 file changed

+5
-4
lines changed

showcase/app/components/shw/carbonization/comparison-grid/index.gts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { TemplateOnlyComponent } from '@ember/component/template-only';
22
import { eq } from 'ember-truth-helpers';
33
import { helper } from '@ember/component/helper';
4+
import { hash } from '@ember/helper';
45

56
import ShwLabel from 'showcase/components/shw/label';
67
import ShwCarbonizationComparisonGridItem from './item';
@@ -14,8 +15,8 @@ export interface ShwCarbonizationComparisonGridSignature {
1415
};
1516
Blocks: {
1617
label: [];
17-
theming: [];
18-
reference: [];
18+
theming: [{ theme: Theme }];
19+
reference: [{ theme: Theme }];
1920
};
2021
Element: HTMLDivElement;
2122
}
@@ -58,7 +59,7 @@ const ShwCarbonizationComparisonGrid: TemplateOnlyComponent<ShwCarbonizationComp
5859
@theme={{theme}}
5960
@label={{(unless @hideThemeLabels theme)}}
6061
>
61-
{{yield to="theming"}}
62+
{{yield (hash theme=theme) to="theming"}}
6263
</ShwCarbonizationComparisonGridItem>
6364
{{/each}}
6465
{{/if}}
@@ -70,7 +71,7 @@ const ShwCarbonizationComparisonGrid: TemplateOnlyComponent<ShwCarbonizationComp
7071
@theme={{theme}}
7172
@label={{(unless @hideCarbonLabels (carbonLabel theme))}}
7273
>
73-
{{yield to="reference"}}
74+
{{yield (hash theme=theme) to="reference"}}
7475
</ShwCarbonizationComparisonGridItem>
7576
{{/unless}}
7677
{{/each}}

0 commit comments

Comments
 (0)