Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix: text component docs #205

Merged
merged 6 commits into from
Sep 7, 2018
Merged

fix: text component docs #205

merged 6 commits into from
Sep 7, 2018

Conversation

codepretty
Copy link
Collaborator

Updating the text doc to have all examples & have accessibility info

  • all text types, states, and variations now have shorthand & children examples
  • fixed some cases where children/shorthand were reversed

Before
image

After
image

@codecov
Copy link

codecov bot commented Sep 7, 2018

Codecov Report

Merging #205 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #205   +/-   ##
=======================================
  Coverage   89.23%   89.23%           
=======================================
  Files          50       50           
  Lines         836      836           
  Branches      130      119   -11     
=======================================
  Hits          746      746           
  Misses         86       86           
  Partials        4        4
Impacted Files Coverage Δ
src/components/Text/Text.tsx 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7606ca2...3be6141. Read the comment docs.

@@ -3,21 +3,21 @@ import { Text } from '@stardust-ui/react'

const TextSizesExampleShorthand = () => (
<div>
<Text size="xs">Dicta voluptatum dolorem.</Text>
<Text size="xs" content="Dicta voluptatum dolorem." />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


const TextSizesExample = () => (
<div>
<Text size="xs">Dicta voluptatum dolorem.</Text>
Copy link
Contributor

@kuzhelov kuzhelov Sep 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, this raises another point related to the values used for sizes. The problem is that it is hard to intuitively reason for the client about, say, which one is bigger: xl or 2x. Would propose to use values that are more intuitive in this sense (and address the issue by means of separate PR).

Quite similar sentiments are expressed in #136.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree. My next PR is going to use a theme-based enum to show the appropriate sizes.

What I'm still not sure about is what to do for naming and how that could vary among themes...

Copy link
Contributor

@kuzhelov kuzhelov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog.md should be updated as this PR introduces publicly visible changes

@kuzhelov kuzhelov merged commit a6d7bcb into master Sep 7, 2018
@kuzhelov kuzhelov deleted the fix/text-component-docs branch September 7, 2018 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants