-
Notifications
You must be signed in to change notification settings - Fork 51
fix: text component docs #205
Changes from all commits
efe8050
531cf7f
8b28f39
c29dec7
7a51081
3be6141
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextExampleDisabledShorthand = () => ( | ||
| <Text disabled content="This feature has been disabled." /> | ||
| ) | ||
|
|
||
| export default TextExampleDisabledShorthand |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextExampleErrorShorthand = () => <Text error content="There has been an error." /> | ||
|
|
||
| export default TextExampleErrorShorthand |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextExampleSuccessShorthand = () => ( | ||
| <Text success content="Your action has completed successfully." /> | ||
| ) | ||
|
|
||
| export default TextExampleSuccessShorthand |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextSizesExample = () => ( | ||
| <div> | ||
| <Text size="xs">Dicta voluptatum dolorem.</Text> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: Quite similar sentiments are expressed in #136.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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... |
||
| <br /> | ||
| <Text size="sm">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="md">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="lg">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="xl">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="2x">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="3x">Dicta voluptatum dolorem.</Text> | ||
| <br /> | ||
| <Text size="4x">Dicta voluptatum dolorem.</Text> | ||
| </div> | ||
| ) | ||
| export default TextSizesExample | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextWeightsExample = () => ( | ||
| <div> | ||
| <Text weight="light">This text is light.</Text> | ||
| <br /> | ||
| <Text weight="semilight">This text is semilight.</Text> | ||
| <br /> | ||
| <Text weight="regular">This text is regular.</Text> | ||
| <br /> | ||
| <Text weight="semibold">This text is semibold.</Text> | ||
| <br /> | ||
| <Text weight="bold">This text is bold.</Text> | ||
| </div> | ||
| ) | ||
| export default TextWeightsExample |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextExampleAtMentionShorthand = () => <Text atMention content="@Russell Wilson" /> | ||
|
|
||
| export default TextExampleAtMentionShorthand |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import React from 'react' | ||
| import { Text } from '@stardust-ui/react' | ||
|
|
||
| const TextExampleTimestampShorthand = () => ( | ||
| <Text timestamp title="August 28, 2018 at 11:16PM" content="Yesterday 11:16PM" /> | ||
| ) | ||
|
|
||
| export default TextExampleTimestampShorthand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍