From 5289543362ebaa3caaa4bcf8df22bfe0a1e51791 Mon Sep 17 00:00:00 2001 From: "valentin d. pinkman" Date: Tue, 20 Feb 2018 10:41:41 +0100 Subject: [PATCH] Added a prop to Text component in storybook to change the display text --- src/components/base/Text/stories.js | 7 ++++--- yarn.lock | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/base/Text/stories.js b/src/components/base/Text/stories.js index 3b9ef7ee..1629a769 100644 --- a/src/components/base/Text/stories.js +++ b/src/components/base/Text/stories.js @@ -3,6 +3,7 @@ import React from 'react' import map from 'lodash/map' import { storiesOf } from '@storybook/react' +import { text } from '@storybook/addon-knobs' import Box from 'components/base/Box' import Text from 'components/base/Text' @@ -17,7 +18,7 @@ const Title = ({ children }: { children: string }) => ( ) -const FontStyles = () => ( +const FontStyles = ({ txt }: { txt: string }) => ( {'Font styles'} {map(fontFamilies, (weights, fontName) => ( @@ -30,7 +31,7 @@ const FontStyles = () => ( - {'The quick brown fox jumps over the lazy dog'} + {txt} ))} @@ -57,7 +58,7 @@ const FontSizes = () => ( stories.add('all fonts styles', () => ( - + )) diff --git a/yarn.lock b/yarn.lock index 8152815f..45db858f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5665,6 +5665,7 @@ ledger-test-library@KhalilBellakrid/ledger-test-library: resolved "https://codeload.github.com/KhalilBellakrid/ledger-test-library/tar.gz/250c9fc992f498360f6396d4ed3ea1bb7637d863" dependencies: axios "^0.17.1" + bindings "^1.3.0" nan "^2.6.2" prebuild-install "^2.2.2"