Skip to content

Commit

Permalink
fix faker images in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Oct 17, 2024
1 parent f0b9bba commit a2a7a07
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
19 changes: 10 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.4.2",
"@embroider/test-setup": "^0.43.5",
"@faker-js/faker": "^8.0.2",
"@faker-js/faker": "^9.0.3",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/controllers/demo/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default Controller.extend({
contacts.push({
name: faker.person.fullName(),
email: faker.internet.email(),
img: faker.internet.avatar()
img: faker.image.dataUri()
});
}

Expand Down
7 changes: 7 additions & 0 deletions tests/dummy/app/helpers/faker-image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { helper } from '@ember/component/helper';
import { faker } from '@faker-js/faker';

export default helper(function fakerImage(positional, named) {
const options = { height: 200, width: 200, ...named };
return faker.image.url(options);
});
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/demo/divider.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<PaperList @classNames="list-demo">
{{#each messages as |item|}}
<PaperItem @class="md-3-line">
<img src="{{item.face}}?{{$index}}" class="face" alt={{item.who}}>
<img src="/{{item.face}}?{{$index}}" class="face" alt={{item.who}}>
<div class="md-list-item-text">
<h3>{{item.what}}</h3>
<h4>{{item.who}}</h4>
Expand Down
6 changes: 3 additions & 3 deletions tests/dummy/app/templates/demo/radio.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
</group.label>

<group.radio @value="graphic-1" @primary={{true}}>
<img src="http://tinyurl.com/zwvmqz8" alt="example1">
<img src="{{faker-image height=128 width=128}}" width="128" height="128" alt="example1">
</group.radio>

<group.radio @value="graphic-2" @warn={{true}}>
<img src="http://tinyurl.com/jdcepzm" alt="example2">
<img src="{{faker-image height=128 width=128}}" width="128" height="128" alt="example2">
</group.radio>

<group.radio @value="graphic-3">
<img src="http://tinyurl.com/j55t8cd" alt="example3">
<img src="{{faker-image height=128 width=128}}" width="128" height="128" alt="example3">
</group.radio>

</PaperRadioGroup>
Expand Down

0 comments on commit a2a7a07

Please sign in to comment.