Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Image stretching fix #234

Merged
merged 6 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/psammead-image/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

| Version | Description |
|---------|-------------|
| 0.2.0 | [PR#234](https://github.com/BBC-News/psammead/pull/234) Change height prop to be optional. Update the storybook example. |

This comment was marked as resolved.

| 0.1.0 | [PR#225](https://github.com/BBC-News/psammead/pull/225) Create initial package, pulled in from [Simorgh](https://github.com/BBC-News/simorgh). |
6 changes: 3 additions & 3 deletions packages/components/psammead-image/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 packages/components/psammead-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-image",
"version": "0.1.0",
"version": "0.2.0",
"main": "dist/index.js",
"description": "React styled components for an Image",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-image/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Image = styled.img`

Image.propTypes = {
alt: string.isRequired,
height: oneOfType([string, number]).isRequired,
height: oneOfType([string, number]),
src: string.isRequired,
width: oneOfType([string, number]).isRequired,
};
Expand Down
8 changes: 1 addition & 7 deletions packages/components/psammead-image/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ const imageAlt =
const imageSrc =
'https://ichef.bbci.co.uk/news/640/cpsprodpb/439A/production/_100960371_syrians_and_asylum_v2-nc.png';
const imageWidth = 853;
const imageHeight = 1067;

storiesOf('Image', module).add('default', () => (
<Image
alt={imageAlt}
src={imageSrc}
width={imageWidth}
height={imageHeight}
/>
<Image alt={imageAlt} src={imageSrc} width={imageWidth} />
));