-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DS-783] - Fix inconsistencies in the text component #754
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1e09e86
feat: create new text components
e4f3988
test: update snapshots and create new tests
7755bcb
docs: update text component doc and create typography doc
dc48604
docs: add comments in the code
a7a30df
docs: update typography doc
6a9567d
docs: add comments in the code
b87f837
docs: fix typo
88350b0
docs: fix typo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 30 additions & 54 deletions
84
packages/doc/content/components/components/text/default-web.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: 'Typography' | ||
metaTitle: 'Typography' | ||
metaDescription: 'Typography' | ||
--- | ||
|
||
## Typography | ||
|
||
Inter is a font crafted & designed for screens. Is the main font used in Yoga because it can support long texts and information hierarchy to ensure good user experiences. It works for most things, like headings and body. | ||
|
||
NaN Holo is used when we want to highlight, especially our brand, but also titles and feedback, for example. NaN Holo is used in our wow moments, so it shouldn't be used in long texts. | ||
|
||
### Usage description | ||
|
||
| **Component** | **Font-Size** | **Font-Weight** | **Line-Height** | **Usage** | | ||
| ------------------------------- | ------------- | --------------- | --------------- | --------------- | | ||
| `<Text.Display1>` | xhuge (60) | bold (700) | xhuge (60) | Use in wow moments, always in headings! <br /> Display 1 is the largest type of text on a screen, reserved for short and important texts. | | ||
| `<Text.Display2>` | xxxlarge (40) | bold (700) | xxlarge (40) | Use in wow moments, always in titles! <br /> Display 2 can be the largest type of text on a screen, reserved for short and important texts. | | ||
| `<Text.Display3>` | xxlarge (32) | bold (700) | xlarge (32) | Use in wow moments, always in headings! <br /> Display 3 is the largest type of text on a mobile screen, reserved for short and important texts. | | ||
| `<Text.Display4>` | xlarge (24) | bold (700) | medium (24) | Use in wow moments, always in headings! <br /> Display 4 is one of the largest type of text on a screen. | | ||
| `<Text.DisplayNumber>` | xxxlarge (40) | bold (700) | xxlarge (40) | Use in wow moments, always in headings! <br /> DisplayNumber is one of the largest type of text on a screen, reserved for important numbers. | | ||
| `<Text.H1>` | huge (48) | medium (500) | huge (56) | H1 is the largest type of text on a screen, reserved for short, important text or numerals | | ||
| `<Text.H1 bold>` | huge (48) | bold (700) | huge (56) | H1 is the largest type of text on a screen, reserved for short, important text or numerals. <br /> Use the bold prop for highlights | | ||
| `<Text.H2>` | xxxlarge (40) | medium (500) | xxxlarge (48) | H2 can be the largest type of text on a screen, reserved for short, important text or numerals. | | ||
| `<Text.H2 bold>` | xxxlarge (40) | bold (700) | xxxlarge (48) | H2 can be the largest type of text on a screen, reserved for short, important text or numerals. <br /> Use the bold prop for highlights | | ||
| `<Text.H3>` | xxlarge (32) | medium (500) | xxlarge (40) | H3 is the largest type of text on a mobile screen, reserved for short, important text or numerals. | | ||
| `<Text.H3 bold>` | xxlarge (32) | bold (700) | xxlarge (40) | H3 is the largest type of text on a mobile screen, reserved for short, important text or numerals. <br /> Use the bold prop for highlights | | ||
| `<Text.H4>` | xlarge (24) | medium (500) | xlarge (32) | H4 is one of the largest type of text on a screen. | | ||
| `<Text.H4 bold>` | xlarge (24) | bold (700) | xlarge (32) | H4 is one of the largest type of text on a screen. <br /> Use the bold prop for highlights | | ||
| `<Text.H5>` | large (20) | medium (500) | large (28) | H5 is one of the largest type of text on a screen. A great size of title for Mobile screens. | | ||
| `<Text.H5 bold>` | large (20) | bold (700) | large (28) | H5 is one of the largest type of text on a screen. A great size of title for Mobile screens. <br /> Use the bold prop for highlights | | ||
| `<Text.Body1>` | medium (16) | medium (500) | medium (24) | This is the basic type of text for page content. <br /> It's the old Text. | | ||
| `<Text.Body1 bold>` | medium (16) | bold (700) | medium (24) | This is the basic type of text for page content. <br /> Use the bold prop for highlights | | ||
| `<Text.Body2>` | small (14) | medium (500) | small (20) | This is the basic type of text for page content. <br /> It's the old Text Small. | | ||
| `<Text.Body2 bold>` | small (14) | bold (700) | small (20) | This is the basic type of text for page content. <br /> Use the bold prop for highlights | | ||
| `<Text.Caption>` | xsmall (12) | regular (400) | xsmall (16) | Use captiona also for rules and legal Information. <br /> It's the old Tiny. | | ||
| `<Text.Overline>` | xsmall (12) | bold (700) | xsmall (16) | Overline texts are used sparingly to present a title (above titles), list a component attribute and inside small data visualization components. | | ||
| `<Text.SectionTitle>` | xsmall (12) | medium (500) | xsmall (16) | Avoid the usage! | | ||
| `<Text.SmallestException>` | xxxsmall (10) | regular (400) | xxsmall (12) | Avoid the usage of the Smallest Exception! | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here should be SmallestException, right?