-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement
Text
component to support new typography token (#1820)
<!-- How to write a good PR title: - Follow [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ## Self Checklist - [x] I wrote a PR title in **English** and added an appropriate **label** to the PR. - [x] I wrote the commit message in **English** and to follow [**the Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/). - [x] I [added the **changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) about the changes that needed to be released. (or didn't have to) - [x] I wrote or updated **documentation** related to the changes. (or didn't have to) - [x] I wrote or updated **tests** related to the changes. (or didn't have to) - [x] I tested the changes in various browsers. (or didn't have to) - Windows: Chrome, Edge, (Optional) Firefox - macOS: Chrome, Edge, Safari, (Optional) Firefox ## Related Issue <!-- Please link to issue if one exists --> - Fixes #1833 - #1733 ## Summary <!-- Please brief explanation of the changes made --> - `Text` 컴포넌트의 스타일링을 scss 기반으로 변경 - typo의 타입을 CSS interpolation에서 string literal로 변경 ## Details <!-- Please elaborate description of the changes --> - `typo` : CSS interpolation에서 string literal로 변경합니다. - `align` 속성을 추가합니다. text-align 속성을 지원하기 위한 속성입니다. - `TextElementType` : 라이브러리들을 참고하여 최대한 broad하게 잡았습니다. `div` 타입은 블록 요소로 사용하고 싶을 때, 채널 데스크 애플리케이션에서 자주 사용하던 방법이라 포함했습니다. ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> Yes ## References <!-- Please list any other resources or points the reviewer should be aware of --> - https://polaris.shopify.com/components/typography/text - https://www.radix-ui.com/themes/docs/components/text
- Loading branch information
1 parent
37d79d2
commit a510882
Showing
65 changed files
with
736 additions
and
1,543 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
"@channel.io/bezier-react": major | ||
--- | ||
|
||
`typo` prop of `Text` component is changed to a string literal. Please migrate it like below. With the removal of the styled-component from bezier-react, CSS interpolation is no longer available. | ||
|
||
```tsx | ||
/* AS-IS */ | ||
<Text typo={Typography.Size11} /> | ||
<Text typo={Typography.Size12} /> | ||
<Text typo={Typography.Size13} /> | ||
<Text typo={Typography.Size14} /> | ||
<Text typo={Typography.Size15} /> | ||
<Text typo={Typography.Size16} /> | ||
<Text typo={Typography.Size17} /> | ||
<Text typo={Typography.Size18} /> | ||
<Text typo={Typography.Size22} /> | ||
<Text typo={Typography.Size24} /> | ||
<Text typo={Typography.Size30} /> | ||
<Text typo={Typography.Size36} /> | ||
|
||
/* TO-BE */ | ||
<Text typo="11" /> | ||
<Text typo="12" /> | ||
<Text typo="13" /> | ||
<Text typo="14" /> | ||
<Text typo="15" /> | ||
<Text typo="16" /> | ||
<Text typo="17" /> | ||
<Text typo="18" /> | ||
<Text typo="22" /> | ||
<Text typo="24" /> | ||
<Text typo="30" /> | ||
<Text typo="36" /> | ||
``` |
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,11 @@ | ||
--- | ||
"@channel.io/bezier-react": minor | ||
--- | ||
|
||
Add `align` prop to `Text` component. This prop is used to set horizontal alignment of text. | ||
|
||
```tsx | ||
<Text align="left" /> | ||
<Text align="center" /> | ||
<Text align="right" /> | ||
``` |
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
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
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
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.