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

Commit

Permalink
Merge branch 'latest' into add-figure
Browse files Browse the repository at this point in the history
  • Loading branch information
sareh authored Dec 19, 2018
2 parents b906d57 + f6b23dc commit e8b9e61
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

| Version | Description |
|---------|-------------|
| 0.1.2 | [PR#230](https://github.com/BBC-News/psammead/pull/230) Add README to Storybook |
| 0.1.1 | [PR#228](https://github.com/BBC-News/psammead/pull/228) Ensure package-lock is https. |
| 0.1.0 | [PR#213](https://github.com/BBC-News/psammead/pull/213) Create initial package, pulled in from [simorgh](https://github.com/BBC-News/simorgh). |

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-image-placeholder",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/index.js",
"description": "Provides a 'BBC' image placeholder",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React from 'react';
import { storiesOf } from '@storybook/react'; // eslint-disable-line import/no-extraneous-dependencies
import { storiesOf } from '@storybook/react';
import { withReadme } from 'storybook-readme';
import Readme from '../README.md';
import ImagePlaceholder from '.';

const landscapeImageRatio = 56.25;
const squareImageRatio = 100;
const portraitImageRatio = 177.78;

storiesOf('ImagePlaceholder', module)
.addDecorator(withReadme(Readme))
.add('16x9 image placeholder', () => (
<ImagePlaceholder ratio={landscapeImageRatio} />
))
Expand Down
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.1.1 | [PR#230](https://github.com/BBC-News/psammead/pull/230) Add README to Storybook |
| 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). |
2 changes: 1 addition & 1 deletion 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.1.1",
"main": "dist/index.js",
"description": "React styled components for an Image",
"repository": {
Expand Down
20 changes: 12 additions & 8 deletions packages/components/psammead-image/src/index.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withReadme } from 'storybook-readme';
import Readme from '../README.md';
import Image from './index';

const imageAlt =
Expand All @@ -9,11 +11,13 @@ const imageSrc =
const imageWidth = 853;
const imageHeight = 1067;

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

0 comments on commit e8b9e61

Please sign in to comment.