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

Update stories to use new inputProvider #498

Merged
21 commits merged into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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-caption/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 1.1.2 | [PR#498](https://github.com/bbc/psammead/pull/498) Update stories |
This conversation was marked as resolved.
Show resolved Hide resolved
| 1.1.1 | [PR#459](https://github.com/bbc/psammead/pull/459) Add custom propTypes shape |
| 1.1.0 | [PR#446](https://github.com/bbc/psammead/pull/446) De-italicise text in italic tag |
| 1.0.1 | [PR#424](https://github.com/bbc/psammead/pull/424) Add Snyk badge to readme |
Expand Down
54 changes: 49 additions & 5 deletions packages/components/psammead-caption/package-lock.json

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

6 changes: 3 additions & 3 deletions packages/components/psammead-caption/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-caption",
"version": "1.1.1",
"version": "1.1.2",
"main": "dist/index.js",
"description": "React styled components for a Caption",
"repository": {
Expand All @@ -21,9 +21,9 @@
"@bbc/psammead-styles": "^0.3.2"
},
"devDependencies": {
"@bbc/psammead-storybook-helpers": "^1.0.0",
"@bbc/psammead-test-helpers": "^0.3.3",
"@bbc/psammead-inline-link": "^0.3.4",
"@bbc/psammead-storybook-helpers": "^2.0.0",
"@bbc/psammead-test-helpers": "^0.3.3",
"@bbc/psammead-visually-hidden-text": "^0.1.10",
"react": "^16.6.3",
"styled-components": "^4.1.3"
Expand Down
36 changes: 22 additions & 14 deletions packages/components/psammead-caption/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@ import { withKnobs } from '@storybook/addon-knobs';
import { inputProvider } from '@bbc/psammead-storybook-helpers';
import InlineLink from '@bbc/psammead-inline-link';
import VisuallyHiddenText from '@bbc/psammead-visually-hidden-text';
import { latin } from '@bbc/gel-foundations/scripts';
import notes from '../README.md';
import Caption from '.';

storiesOf('Caption', module)
.addDecorator(withKnobs)
.add(
'default',
inputProvider(['caption'], captionText => (
<Caption script={latin}>{captionText}</Caption>
inputProvider([{ name: 'Caption' }], ([captionText], script) => (
<Caption script={script}>{captionText}</Caption>
)),
{ notes, knobs: { escapeHTML: false } },
)
.add(
'with offscreen text',
inputProvider(
['visually hidden text', 'caption'],
(hiddenText, captionText) => (
<Caption script={latin}>
[
{ name: 'Visual hidden text', defaultText: 'visually hidden text' },
{ name: 'Caption', defaultText: 'caption' },
],
([hiddenText, captionText], script) => (
<Caption script={script}>
<VisuallyHiddenText>{hiddenText}</VisuallyHiddenText>
{captionText}
</Caption>
Expand All @@ -32,18 +34,24 @@ storiesOf('Caption', module)
)
.add(
'containing an inline link',
inputProvider(['inline link', 'caption'], (linkText, captionText) => (
<Caption script={latin}>
{captionText}
<InlineLink href="https://www.bbc.com"> {linkText}</InlineLink>.
</Caption>
)),
inputProvider(
[
{ name: 'Inline link', defaultText: 'inline link' },
{ name: 'Caption', defaultText: 'caption' },
],
([linkText, captionText], script) => (
<Caption script={script}>
{captionText}
<InlineLink href="https://www.bbc.com"> {linkText}</InlineLink>.
</Caption>
),
),
{ notes, knobs: { escapeHTML: false } },
)
.add(
'containing italicisation',
inputProvider([], () => (
<Caption script={latin}>
inputProvider([], (inputs, script) => (
<Caption script={script}>
Example text with <i>italics</i>
</Caption>
)),
Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-headings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 1.1.3 | [PR#498](https://github.com/bbc/psammead/pull/498) Update stories |
This conversation was marked as resolved.
Show resolved Hide resolved
| 1.1.2 | [PR#428](https://github.com/bbc/psammead/pull/428) Add custom propTypes shape |
| 1.1.1 | [PR#412](https://github.com/bbc/psammead/pull/412) Make SubHeading padding-bottom 24px instead of 16px |
| 1.1.0 | [PR#424](https://github.com/bbc/psammead/pull/424) Add Snyk badge to readme |
Expand Down
54 changes: 49 additions & 5 deletions packages/components/psammead-headings/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/components/psammead-headings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-headings",
"version": "1.1.2",
"version": "1.1.3",
"main": "dist/index.js",
"description": "React styled components for a Headline and SubHeading",
"repository": {
Expand All @@ -21,7 +21,7 @@
"@bbc/psammead-styles": "^0.3.2"
},
"devDependencies": {
"@bbc/psammead-storybook-helpers": "^1.0.0",
"@bbc/psammead-storybook-helpers": "^2.0.0",
"@bbc/psammead-test-helpers": "^0.3.3",
"styled-components": "^4.1.3"
},
Expand Down
9 changes: 4 additions & 5 deletions packages/components/psammead-headings/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import { inputProvider } from '@bbc/psammead-storybook-helpers';
import { latin } from '@bbc/gel-foundations/scripts';
import notes from '../README.md';
import { Headline, SubHeading } from './index';

storiesOf('Headline', module)
.addDecorator(withKnobs)
.add(
'default',
inputProvider(['headline'], headline => (
<Headline script={latin}>{headline}</Headline>
inputProvider([{ name: 'Headline' }], ([headline], script) => (
<Headline script={script}>{headline}</Headline>
)),
{ notes, knobs: { escapeHTML: false } },
);
Expand All @@ -20,8 +19,8 @@ storiesOf('SubHeading', module)
.addDecorator(withKnobs)
.add(
'default',
inputProvider(['subheading'], subheader => (
<SubHeading text={subheader} script={latin}>
inputProvider([{ name: 'SubHeading' }], ([subheader], script) => (
<SubHeading text={subheader} script={script}>
{subheader}
</SubHeading>
)),
Expand Down
28 changes: 15 additions & 13 deletions packages/components/psammead-inline-link/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Psammead Inline Link Changelog

<! -- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 0.3.7 | [PR#424](https://github.com/bbc/psammead/pull/424) Add Snyk badge to readme |
| 0.3.6 | [PR#419](https://github.com/bbc/psammead/pull/419) Add language variants knob to Inline Link stories |
| 0.3.5 | [PR#407](https://github.com/bbc/psammead/pull/407) Organise dependencies properly |
| 0.3.4 | [PR#371](https://github.com/bbc/psammead/pull/371) Update colour from Shadow to Ebon |
| 0.3.3 | [PR#323](https://github.com/bbc/psammead/pull/323) Update storybook badge url |
| 0.3.2 | [PR#323](https://github.com/BBC/psammead/pull/323) Update readme storybook badge |
| 0.3.1 | [PR#264](https://github.com/BBC/psammead/pull/319) Resolving package-lock issues. |
| 0.3.0 | [PR#309](https://github.com/bbc/psammead/pull/309) Update colours to reflect new UX designs. |
| 0.2.0 | [PR#248](https://github.com/BBC-News/psammead/pull/248) Remove top and buttom padding |
| 0.1.3 | [PR#264](https://github.com/BBC/psammead/pull/264) Resolving package-lock issues. |
| 0.1.2 | [PR#245](https://github.com/BBC-News/psammead/pull/245) Ensures documentation consistent across component packages. |
| 0.1.1 | [PR#231](https://github.com/BBC-News/psammead/pull/231) Add link to Storybook to README |
| 0.1.0 | [PR#106](https://github.com/BBC-News/psammead/pull/106) Create initial package with Inline Link component pulled in from [Simorgh](https://github.com/BBC-News/simorgh). |
| 0.3.8 | [PR#498](https://github.com/bbc/psammead/pull/498) Update stories |
This conversation was marked as resolved.
Show resolved Hide resolved
| 0.3.7 | [PR#424](https://github.com/bbc/psammead/pull/424) Add Snyk badge to readme |
| 0.3.6 | [PR#419](https://github.com/bbc/psammead/pull/419) Add language variants knob to Inline Link stories |
| 0.3.5 | [PR#407](https://github.com/bbc/psammead/pull/407) Organise dependencies properly |
| 0.3.4 | [PR#371](https://github.com/bbc/psammead/pull/371) Update colour from Shadow to Ebon |
| 0.3.3 | [PR#323](https://github.com/bbc/psammead/pull/323) Update storybook badge url |
| 0.3.2 | [PR#323](https://github.com/BBC/psammead/pull/323) Update readme storybook badge |
| 0.3.1 | [PR#264](https://github.com/BBC/psammead/pull/319) Resolving package-lock issues. |
| 0.3.0 | [PR#309](https://github.com/bbc/psammead/pull/309) Update colours to reflect new UX designs. |
| 0.2.0 | [PR#248](https://github.com/BBC-News/psammead/pull/248) Remove top and buttom padding |
| 0.1.3 | [PR#264](https://github.com/BBC/psammead/pull/264) Resolving package-lock issues. |
| 0.1.2 | [PR#245](https://github.com/BBC-News/psammead/pull/245) Ensures documentation consistent across component packages. |
| 0.1.1 | [PR#231](https://github.com/BBC-News/psammead/pull/231) Add link to Storybook to README |
| 0.1.0 | [PR#106](https://github.com/BBC-News/psammead/pull/106) Create initial package with Inline Link component pulled in from [Simorgh](https://github.com/BBC-News/simorgh). |
Loading