-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate
Overlay
component with scss (#1949)
<!-- 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 --> - #1733 ## Summary <!-- Please brief explanation of the changes made --> Migrate `Overlay` component with scss ## Details <!-- Please elaborate description of the changes --> SCSS 마이그레이션 외 아래와 같은 점들을 변경했습니다. - as 및 interpolation 관련 속성을 제거합니다 - 컴포넌트 리팩토링 - 내부 컴포넌트의 useMemo 제거 - prop 순서 정렬 - 함수의 noop 기본값 제거 - 스타일 관련 테스트 제거 - 스토리에서 styled 사용을 제거하고, 단순한 Primary 테스트 하나만 남깁니다. - 마이너: 공용 elevation css module의 클래스명이 잘못되어있던 부분을 수정합니다. ### Footnotes - 새로 구현하고 싶었으나... 리팩토링의 범위를 한참 뛰어넘는다고 생각하여 진행하지 않았습니다. - 다음 버전의 디자인 시스템에서 스펙 잘 정의하고, 그 때는 [floating-ui](https://floating-ui.com/)같은 라이브러리를 사용하여 재구현(혹은 새로운 컴포넌트 구현)하면 높은 퀄리티의 컴포넌트를 손쉽게 구현할 수 있어 좋을 거 같아요. ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> Yes
- Loading branch information
1 parent
c687ed9
commit a7dad85
Showing
12 changed files
with
222 additions
and
525 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,9 @@ | ||
--- | ||
"@channel.io/bezier-react": major | ||
--- | ||
|
||
**Breaking Changes: Property updates in `Overlay` component** | ||
|
||
- No longer support `as` and `interpolation` property. Replace any usage of `interpolation` property with appropriate `style` or `className` implementations. | ||
- No longer support `containerInterpolation` property. Replace any usage of `containerInterpolation` property with appropriate `containerStyle` or `containerClassName` implementations. | ||
- No longer support `wrapperTestId` property. |
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
32 changes: 32 additions & 0 deletions
32
packages/bezier-react/src/components/Overlay/Overlay.module.scss
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,32 @@ | ||
.OverlayContainer { | ||
position: fixed; | ||
z-index: var(--z-index-overlay); | ||
inset: 0; | ||
|
||
width: 100%; | ||
height: 100%; | ||
|
||
&:where(.hidden) { | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.OverlayWrapper { | ||
position: relative; | ||
z-index: var(--z-index-base); | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.Overlay { | ||
position: absolute; | ||
z-index: var(--z-index-overlay); | ||
|
||
&:where(.hidden) { | ||
opacity: 0; | ||
} | ||
|
||
&:where(.transition) { | ||
transition: top var(--transition-s), opacity var(--transition-s); | ||
} | ||
} |
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.