Skip to content

Commit cd4e9ef

Browse files
committed
refactored content organization to have the carbonization pages as standalone pages
1 parent d7aa813 commit cd4e9ef

File tree

33 files changed

+858
-694
lines changed

33 files changed

+858
-694
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import type { TemplateOnlyComponent } from '@ember/component/template-only';
2+
import { pageTitle } from 'ember-page-title';
3+
import { notEq } from 'ember-truth-helpers';
4+
5+
import ShwTextH1 from 'showcase/components/shw/text/h1';
6+
import ShwTextH2 from 'showcase/components/shw/text/h2';
7+
import ShwFlex from 'showcase/components/shw/flex';
8+
import ShwDivider from 'showcase/components/shw/divider';
9+
import ShwCarbonizationComparisonGrid from 'showcase/components/shw/carbonization/comparison-grid';
10+
11+
import { HdsBadgeCount } from '@hashicorp/design-system-components/components';
12+
import {
13+
COLORS,
14+
SIZES,
15+
TYPES,
16+
} from '@hashicorp/design-system-components/components/hds/badge-count/index';
17+
18+
const BadgeCountIndex: TemplateOnlyComponent = <template>
19+
{{pageTitle "BadgeCount - Carbonization"}}
20+
21+
<ShwTextH1>BadgeCount - Carbonization</ShwTextH1>
22+
23+
<section>
24+
25+
<ShwTextH2>Size</ShwTextH2>
26+
27+
<ShwCarbonizationComparisonGrid>
28+
<:theming>
29+
<ShwFlex @direction="column" as |SF|>
30+
{{#each SIZES as |size|}}
31+
<SF.Item>
32+
<HdsBadgeCount @text="3" @size={{size}} />
33+
<HdsBadgeCount @text="99+" @size={{size}} />
34+
</SF.Item>
35+
{{/each}}
36+
</ShwFlex>
37+
</:theming>
38+
</ShwCarbonizationComparisonGrid>
39+
40+
<ShwDivider @level={{2}} />
41+
42+
<ShwTextH2>Type</ShwTextH2>
43+
44+
<ShwCarbonizationComparisonGrid>
45+
<:theming>
46+
<ShwFlex @direction="column" as |SF|>
47+
{{#each TYPES as |type|}}
48+
<SF.Item>
49+
<HdsBadgeCount @text="3" @type={{type}} />
50+
<HdsBadgeCount @text="99+" @type={{type}} />
51+
</SF.Item>
52+
{{/each}}
53+
</ShwFlex>
54+
</:theming>
55+
</ShwCarbonizationComparisonGrid>
56+
57+
<ShwDivider @level={{2}} />
58+
59+
<ShwTextH2>Color</ShwTextH2>
60+
61+
{{#each COLORS as |color index|}}
62+
<ShwCarbonizationComparisonGrid
63+
@hideThemeLabels={{(if (notEq index 0) true)}}
64+
>
65+
<:theming>
66+
<ShwFlex @direction="column" @gap="0.5rem" as |SF|>
67+
{{#each TYPES as |type|}}
68+
<SF.Item class="shw-component-badge-sample-color--{{color}}">
69+
<HdsBadgeCount @text="3" @type={{type}} @color={{color}} />
70+
<HdsBadgeCount @text="99+" @type={{type}} @color={{color}} />
71+
</SF.Item>
72+
{{/each}}
73+
</ShwFlex>
74+
</:theming>
75+
</ShwCarbonizationComparisonGrid>
76+
{{/each}}
77+
78+
</section>
79+
</template>;
80+
81+
export default BadgeCountIndex;

showcase/app/components/page-components/badge-count/index.gts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import type { TemplateOnlyComponent } from '@ember/component/template-only';
77
import { pageTitle } from 'ember-page-title';
88

99
import ShwTextH1 from 'showcase/components/shw/text/h1';
10-
import ShwDivider from 'showcase/components/shw/divider';
1110

1211
import SubSectionContent from 'showcase/components/page-components/badge-count/sub-sections/content';
1312
import SubSectionVariants from 'showcase/components/page-components/badge-count/sub-sections/variants';
14-
import SubSectionCarbonization from 'showcase/components/page-components/badge-count/sub-sections/carbonization';
1513

1614
const BadgeCountIndex: TemplateOnlyComponent = <template>
1715
{{pageTitle "BadgeCount Component"}}
@@ -22,15 +20,6 @@ const BadgeCountIndex: TemplateOnlyComponent = <template>
2220
<SubSectionContent />
2321
<SubSectionVariants />
2422
</section>
25-
26-
<ShwDivider />
27-
<ShwDivider />
28-
29-
<ShwTextH1>Carbonization</ShwTextH1>
30-
31-
<section>
32-
<SubSectionCarbonization />
33-
</section>
3423
</template>;
3524

3625
export default BadgeCountIndex;

showcase/app/components/page-components/badge-count/sub-sections/carbonization.gts

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)