Skip to content

Commit

Permalink
inherit height from component
Browse files Browse the repository at this point in the history
  • Loading branch information
JayChase committed Nov 12, 2019
1 parent bd857d4 commit 664eb3b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
2 changes: 1 addition & 1 deletion projects/ngx-picture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-picture",
"version": "1.0.7",
"version": "1.0.8",
"repository": {
"type": "git",
"url": "https://github.com/jaychase/ngx-picture.git"
Expand Down
33 changes: 33 additions & 0 deletions projects/ngx-picture/src/stories/1-ngx-picture.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,39 @@ storiesOf('ngx-picture', module)
defaultViewport: 'sm'
}
})
.add('fixed height (450px)', () => {
return {
template: `<div style="height: 450px">
<ngx-picture [src]="src" [alt]="alt" ></ngx-picture>
</div>`,
props: {
src: text('src', 'assets/images/banner.jpg'),
alt: text('alt', 'banner image')
}
};
})
.add('fixed height (150px)', () => {
return {
template: `<div style="height: 150px">
<ngx-picture [src]="src" [alt]="alt" ></ngx-picture>
</div>`,
props: {
src: text('src', 'assets/images/banner.jpg'),
alt: text('alt', 'banner image')
}
};
})
.add('height auto ', () => {
return {
template: `<div style="height: auto">
<ngx-picture [src]="src" [alt]="alt" ></ngx-picture>
</div>`,
props: {
src: text('src', 'assets/images/banner.jpg'),
alt: text('alt', 'banner image')
}
};
})
.add('eager load', () => {
return {
component: PictureComponent,
Expand Down

0 comments on commit 664eb3b

Please sign in to comment.