Browse Source

Merge pull request #145 from valpinkman/master

Added a prop to Text component in storybook to change the display text
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
a70407fc6d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/components/base/Text/stories.js
  2. 1
      yarn.lock

7
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 }) => (
</Text>
)
const FontStyles = () => (
const FontStyles = ({ txt }: { txt: string }) => (
<Box flow={4}>
<Title>{'Font styles'}</Title>
{map(fontFamilies, (weights, fontName) => (
@ -30,7 +31,7 @@ const FontStyles = () => (
</Text>
</Box>
<Text key={weight} ff={`${fontName}|${weight}`}>
{'The quick brown fox jumps over the lazy dog'}
{txt}
</Text>
</Box>
))}
@ -57,7 +58,7 @@ const FontSizes = () => (
stories.add('all fonts styles', () => (
<Box flow={4}>
<FontStyles />
<FontStyles txt={text('text', 'The quick brown fox jumps over the lazy dog')} />
<FontSizes />
</Box>
))

1
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"

Loading…
Cancel
Save