Skip to content

Commit

Permalink
feat: 꿀조합 등록 버튼 스타일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Apr 18, 2024
1 parent bf46a51 commit 134389b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/components/Recipe/CommentForm/CommentForm.tsx
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 }],
});

0 comments on commit 134389b

Please sign in to comment.