refactor: 스타일 통합 진행 - #13
Draft
jhlee0409 wants to merge 3 commits into
Draft
Conversation
jhlee0409
marked this pull request as draft
January 6, 2025 12:59
omizha
reviewed
Jan 6, 2025
| return ( | ||
| <Radix.Root type="always" className={scrollViewStyle} data-f="SR-5f71" {...props}> | ||
| <Radix.Viewport className={viewportStyle} onScroll={onScroll} data-f="SV-3fb5"> | ||
| <RootContainer type="always" data-f="SR-5f71" {...props}> |
Collaborator
There was a problem hiding this comment.
Radix 라이브러리를 참조하고 있다는 것을 명확하게 나타내는 것이 좋다고 생각하기에
이전 그대로 두는 것은 어떤가요?
Member
Author
There was a problem hiding this comment.
저는 UI kit의 역할을 하는 컴포넌트의 경우 본질적으로 구현부를 알 필요가 없다고 판단하기도 했고,
관리 포인트를 하나로 묶는 것이 좋다라고 생각해서 별도의 컴포넌트로 나누었습니다만 하이안의 의견을 반영해서 좀 더 찾아보니
import { css } from '@emotion/react'
const cardCss = {
self: css({
backgroundColor: 'white',
border: '1px solid #eee',
borderRadius: '0.5rem',
padding: '1rem'
}),
title: css({
fontSize: '1.25rem'
})
}
export function Card({ title, children }) {
return (
<div css={cardCss.self}>
<h5 css={cardCss.title}>{title}</h5>
{children}
</div>
)
}이런 식으로 radix의 참조를 직관적으로 표기하되, css에 대한 관리체계를 더 명확하게 할 수 있을것 같네요.
헤드리스의 포인트와, 실질적일 스타일링의 분리도 하나의 장점이 될 수 있을 것 같습니다.
두 가지 관점모두 장단점이 있을 것 같습니다
한번 참고해서 수정해보고 다시 리뷰 요청드리겠습니다
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.