Skip to content

Commit fe4ac16

Browse files
authored
Showcase: convert Form Layout page to gts format (#3319)
1 parent 7c8221e commit fe4ac16

File tree

16 files changed

+1907
-1413
lines changed

16 files changed

+1907
-1413
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Copyright (c) HashiCorp, Inc.
3+
* SPDX-License-Identifier: MPL-2.0
4+
*/
5+
import Component from '@glimmer/component';
6+
import { pageTitle } from 'ember-page-title';
7+
import { tracked } from '@glimmer/tracking';
8+
9+
import ShwDivider from 'showcase/components/shw/divider';
10+
import ShwTextH1 from 'showcase/components/shw/text/h1';
11+
12+
import SubSectionContainers from 'showcase/components/page-components/form/layout/sub-sections/containers';
13+
import SubSectionContent from 'showcase/components/page-components/form/layout/sub-sections/content';
14+
import SubSectionComponents from 'showcase/components/page-components/form/layout/sub-sections/components';
15+
import SubSectionResponsiveness from 'showcase/components/page-components/form/layout/sub-sections/responsiveness';
16+
import SubSectionExamples from 'showcase/components/page-components/form/layout/sub-sections/examples';
17+
import SubSectionWithinContainers from 'showcase/components/page-components/form/layout/sub-sections/within-containers';
18+
19+
export default class FormLayoutIndex extends Component {
20+
@tracked showHighlight = false;
21+
22+
toggleHighlight = () => {
23+
this.showHighlight = !this.showHighlight;
24+
};
25+
26+
<template>
27+
{{pageTitle "Form Component"}}
28+
29+
<ShwTextH1>Form / Layout components</ShwTextH1>
30+
31+
<section data-test-percy>
32+
<SubSectionContainers
33+
@toggleHighlight={{this.toggleHighlight}}
34+
@showHighlight={{this.showHighlight}}
35+
/>
36+
37+
<SubSectionContent
38+
@toggleHighlight={{this.toggleHighlight}}
39+
@showHighlight={{this.showHighlight}}
40+
/>
41+
42+
<SubSectionComponents
43+
@toggleHighlight={{this.toggleHighlight}}
44+
@showHighlight={{this.showHighlight}}
45+
/>
46+
47+
</section>
48+
49+
<ShwDivider />
50+
51+
<section class="shw-component-form-layout-examples-wrapper" data-test-percy>
52+
<SubSectionExamples />
53+
</section>
54+
55+
<ShwDivider />
56+
57+
<section>
58+
<SubSectionWithinContainers />
59+
</section>
60+
61+
<ShwDivider />
62+
63+
{{! For some reason, Ember tests don't play well with iframes (URL not found) so we can't take snapshots of these examples in Percy }}
64+
<section>
65+
<SubSectionResponsiveness />
66+
</section>
67+
</template>
68+
}

0 commit comments

Comments
 (0)