Skip to content
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

feat: 꿀조합 등록 버튼 스타일 수정 #93

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/components/Recipe/CommentForm/CommentForm.tsx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

궁금한게 있는데 댓글 프로필 이미지 부분 MemberImage 컴포넌트로 대체 가능한가요?
지금 마이페이지 작업 중인데 이런 컴포넌트가 있더라구요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오....... 맞다 제가 만들었는데 까먹었네요??

Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,8 @@ const CommentForm = ({ recipeId, scrollTargetRef }: CommentFormProps) => {
<Text size="caption4" color="disabled">
{commentValue.length}/200
</Text>
<button className={sendButton}>
<SvgIcon
variant="plane"
width={18}
height={18}
fill={commentValue.length === 0 ? vars.colors.gray3 : vars.colors.gray5}
/>
<button className={commentValue.length === 0 ? sendButton['disabled'] : sendButton['active']}>
<SvgIcon variant="plane" width={14} height={14} fill={vars.colors.white} />
</button>
</form>
</>
Expand Down
12 changes: 10 additions & 2 deletions src/components/Recipe/CommentForm/commentForm.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { vars } from '@/styles/theme.css';
import { style } from '@vanilla-extract/css';
import { style, styleVariants } from '@vanilla-extract/css';

export const container = style({
display: 'flex',
Expand Down Expand Up @@ -38,6 +38,14 @@ export const profileImage = style({
borderRadius: '50%',
});

export const sendButton = style({
export const sendButtonStyles = style({
display: 'inherit',
width: 36,
borderRadius: 45,
padding: '4px 10px',
});

export const sendButton = styleVariants({
active: [sendButtonStyles, { background: vars.colors.primary }],
disabled: [sendButtonStyles, { background: vars.colors.gray3 }],
});
Loading