Skip to content

Commit 200d459

Browse files
committed
chore: simplify dummy app by using 2 components for less copy/paste
1 parent 0387668 commit 200d459

File tree

8 files changed

+31
-25
lines changed

8 files changed

+31
-25
lines changed

tests/dummy/app/components/.gitkeep

Whitespace-only changes.

tests/dummy/app/controllers/.gitkeep

Whitespace-only changes.

tests/dummy/app/helpers/.gitkeep

Whitespace-only changes.

tests/dummy/app/models/.gitkeep

Whitespace-only changes.

tests/dummy/app/routes/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<section class="bg-white p-3 flex flex-col rounded-md">
2+
{{yield}}
3+
</section>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="text-xl font-bold pb-1">
2+
{{code-snippet @code}}
3+
</div>

tests/dummy/app/templates/index.hbs

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
<section class="bg-white px-3 flex flex-col rounded-md">
2-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-random "arrayElement" (array "Link" "Ganon" "Zelda")'}}</div>
1+
<ExampleSection>
2+
<Snippet @code={{concat 'faker-random "arrayElement" (array "Link" "Ganon" "Zelda")'}} />
33
<div>{{faker-random "arrayElement" (array "Link" "Ganon" "Zelda")}}</div>
4-
</section>
5-
<section class="bg-white p-3 flex flex-col rounded-md">
6-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-fake "{{name.lastName}}, {{name.firstName}} {{name.suffix}}"'}}</div>
4+
</ExampleSection>
5+
<ExampleSection>
6+
<Snippet @code={{concat 'faker-fake "{{name.lastName}}, {{name.firstName}} {{name.suffix}}"'}} />
77
<div>{{faker-fake "{{name.lastName}}, {{name.firstName}} {{name.suffix}}"}}</div>
8-
</section>
9-
<section class="bg-white p-3 flex flex-col rounded-md">
10-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-fake "{{hacker.phrase}}"'}}</div>
8+
</ExampleSection>
9+
<ExampleSection>
10+
<Snippet @code={{concat 'faker-fake "{{hacker.phrase}}"'}} />
1111
<div>{{faker-fake "{{hacker.phrase}}"}}</div>
12-
</section>
13-
<section class="bg-white p-3 flex flex-col rounded-md">
14-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-sentence 10'}}</div>
12+
</ExampleSection>
13+
<ExampleSection>
14+
<Snippet @code="faker-sentence 10" />
1515
<div>{{faker-sentence 10}}</div>
16-
</section>
17-
<section class="bg-white p-3 flex flex-col rounded-md">
18-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-sentences 5'}}</div>
16+
</ExampleSection>
17+
<ExampleSection>
18+
<Snippet @code="faker-sentences 5" />
1919
<div>{{faker-sentences 5}}</div>
20-
</section>
21-
<section class="bg-white p-3 flex flex-col rounded-md">
22-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-text'}}</div>
20+
</ExampleSection>
21+
<ExampleSection>
22+
<Snippet @code="faker-text" />
2323
<div>{{faker-text}}</div>
24-
</section>
25-
<section class="bg-white p-3 flex flex-col rounded-md">
26-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-fake "{{internet.color}}"'}}</div>
24+
</ExampleSection>
25+
<ExampleSection>
26+
<Snippet @code={{concat 'faker-fake "{{internet.color}}"'}} />
2727
{{#with (faker-fake "{{internet.color}}") as |color|}}
2828
<div class="py-4 px-1" style={{html-safe (concat "background-color: " color)}}>{{color}}</div>
2929
{{/with}}
30-
</section>
31-
<section class="bg-white p-3 flex flex-col rounded-md">
32-
<div class="text-xl font-bold pb-1">{{code-snippet 'faker-fake "{{image.cats}}"'}}</div>
33-
<div><img class="w-32" src={{faker-fake "{{image.cats}}"}} alt="fake"></div>
34-
</section>
30+
</ExampleSection>
31+
<ExampleSection>
32+
<Snippet @code={{concat 'faker-fake "{{image.cats}}"'}} />
33+
<div><img class="w-32" src={{faker-fake "{{image.cats}}"}} alt="fake" /></div>
34+
</ExampleSection>

0 commit comments

Comments
 (0)