Skip to content
Permalink
Browse files

feat: finalise the Text component (#151)

* feat: finalise the Text component

* chore: update the paragraph snapshot

* chore: name the interface the same as the component
  • Loading branch information...
SiTaggart committed Oct 28, 2019
1 parent c44ceb7 commit b51c272cf420380f73c31c3474ebdf23cb7cad3a
Showing with 2,452 additions and 204 deletions.
  1. +3 −3 packages/paste-core/components/typography/__tests__/__snapshots__/paragraph.test.tsx.snap
  2. +5 −5 packages/paste-core/utilities/absolute/stories/index.stories.tsx
  3. +2 −0 packages/paste-core/utilities/box/src/index.tsx
  4. +4 −2 packages/paste-core/utilities/box/stories/index.stories.tsx
  5. +2 −2 packages/paste-core/utilities/media-object/stories/index.stories.tsx
  6. +1 −1 packages/paste-core/utilities/screen-reader-only/stories/index.stories.tsx
  7. +1,608 −0 packages/paste-core/utilities/text/__tests__/__snapshots__/text.spec.tsx.snap
  8. +577 −0 packages/paste-core/utilities/text/__tests__/text.spec.tsx
  9. +35 −29 packages/paste-core/utilities/text/src/index.tsx
  10. +51 −10 packages/paste-core/utilities/text/stories/index.stories.tsx
  11. +1 −1 packages/paste-core/utilities/truncate/stories/index.stories.tsx
  12. +113 −113 packages/paste-icons/__IconList.tsx
  13. +1 −1 packages/paste-icons/tools/listTemplate.js
  14. +5 −0 packages/paste-types/src/style-props/font.ts
  15. +1 −1 packages/paste-website/src/components/DoDont.tsx
  16. +1 −1 packages/paste-website/src/components/Heading.tsx
  17. +3 −5 packages/paste-website/src/components/callout/types.ts
  18. +3 −2 packages/paste-website/src/components/empty-state/InDevelopment.tsx
  19. +3 −2 packages/paste-website/src/components/empty-state/NotBuilt.tsx
  20. +2 −1 packages/paste-website/src/components/empty-state/NotFound.tsx
  21. +1 −1 packages/paste-website/src/components/site-wrapper/SiteFooter.tsx
  22. +10 −4 packages/paste-website/src/components/tokens-example/index.tsx
  23. +2 −2 packages/paste-website/src/components/tokens-list/index.tsx
  24. +18 −18 yarn.lock
@@ -17,11 +17,11 @@ exports[`Paragraph it should render a single paragraph 1`] = `
.emotion-0 {
margin: 0;
padding: 0;
margin-bottom: 1.5rem;
font-size: 0.875rem;
color: #282a2b;
font-weight: 400;
line-height: 1.714285714;
margin-bottom: 1.5rem;
font-weight: 400;
color: #282a2b;
}

<div
@@ -46,17 +46,17 @@ storiesOf('Utilities|Absolute', module)

return (
<Absolute {...props}>
<Text>The `position` prop should be sufficient, but you can also pass overrides directly:</Text>
<Text>
<Text as="p">The `position` prop should be sufficient, but you can also pass overrides directly:</Text>
<Text as="p">
<strong>Top:</strong> {top ? props.top : 'not provided'}
</Text>
<Text>
<Text as="p">
<strong>Right:</strong> {right ? props.right : 'not provided'}
</Text>
<Text>
<Text as="p">
<strong>Bottom:</strong> {bottom ? props.bottom : 'not provided'}
</Text>
<Text>
<Text as="p">
<strong>Left:</strong> {left ? props.left : 'not provided'}
</Text>
</Absolute>
@@ -63,6 +63,8 @@ const Box = styled.div<BoxProps>(
)
);

Box.displayName = 'Box';

Box.defaultProps = {
minWidth: 'size0',
};
@@ -120,7 +120,9 @@ storiesOf('Utilities|Box', module)
zIndex={zIndexValue}
overflow={overflowValue}
>
<Text textColor="colorText">{demoString}</Text>
<Text as="p" textColor="colorText">
{demoString}
</Text>
</Box>
);
})
@@ -131,7 +133,7 @@ storiesOf('Utilities|Box', module)
padding={['space20', 'space70']}
height={['size10', 'size20']}
>
<Text textColor="colorText">
<Text as="p" textColor="colorText">
DO NOTE: width is not currently responsive due to a bug in Styled System v4. To be fixed in an upgrade.
</Text>
</Box>
@@ -15,7 +15,7 @@ storiesOf('Utilities|Media Object', module)
<Box backgroundColor="colorBackgroundSuccess" height="size10" minWidth="size10" />
</Media.Figure>
<Media.Body>
<Text>Some media Object body text</Text>
<Text as="p">Some media Object body text</Text>
</Media.Body>
</Media.Object>
);
@@ -28,7 +28,7 @@ storiesOf('Utilities|Media Object', module)
<Box backgroundColor="colorBackgroundSuccess" height="size10" minWidth="size10" />
</Media.Figure>
<Media.Body>
<Text>Some media Object body text</Text>
<Text as="p">Some media Object body text</Text>
</Media.Body>
<Media.Figure align="end" spacing={spaceValue}>
<Box backgroundColor="colorBackgroundSuccess" height="size10" minWidth="size10" />
@@ -8,7 +8,7 @@ storiesOf('Utilities|Screen reader only', module)
.addDecorator(withKnobs)
.add('Default', () => {
return (
<Text>
<Text as="p">
Some visible text <ScreenReaderOnly>some not visible text</ScreenReaderOnly>
</Text>
);

1 comment on commit b51c272

@now

This comment has been minimized.

Please sign in to comment.
You can’t perform that action at this time.