Skip to content

Commit

Permalink
Merge pull request #494 from js43o/label-color
Browse files Browse the repository at this point in the history
[Refactor] 모각코 상태에 따라 라벨 색상 변경
  • Loading branch information
js43o authored Dec 28, 2023
2 parents cc3a252 + c8b051c commit 447f80a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/frontend/src/components/MogacoItem/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ export const title = style([
export const titleArea = style({
display: 'flex',
alignItems: 'center',
gap: '0.4rem',
gap: '0.8rem',
width: '100%',
});
6 changes: 5 additions & 1 deletion app/frontend/src/components/MogacoItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export function MogacoItem({
status,
}: MogacoProps) {
const MogacoLabel = (
<Label theme="primary" shape="fill" disabled={status === '마감'}>
<Label
theme={status === '모집 중' ? 'primary' : 'danger'}
shape="fill"
disabled={status === '모집 마감'}
>
{status}
</Label>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export function TitleWrapper({
}: Pick<ResponseMogacoDto, 'title' | 'status'>) {
return (
<div className={styles.titleWrapper}>
<Label theme="primary" shape="fill">
<Label
theme={status === '모집 중' ? 'primary' : 'danger'}
shape="fill"
disabled={status === '모집 마감'}
>
{status}
</Label>
<span className={styles.title}>{title}</span>
Expand Down
5 changes: 3 additions & 2 deletions packages/morak-ui/src/components/Label/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ const { grayscale50, morakGreen, morakRed, grayscale200 } = vars.color;
export const container = recipe({
base: {
display: 'inline-flex',
flexShrink: 0,
justifyContent: 'center',
alignItems: 'center',
minWidth: '3.5rem',
padding: '0.4rem 1.5rem',
minWidth: '3.6rem',
padding: '0.4rem 1.4rem',
borderRadius: '100rem',
whiteSpace: 'pre',
},
Expand Down

0 comments on commit 447f80a

Please sign in to comment.