Skip to content

Commit

Permalink
#115 style: 챌린지 블록과 일반 블록 UI 구분
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Nov 25, 2024
1 parent 024bc3d commit 5e7c48d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Props = {
picture?: string;
progress?: string;
highlightColor?: string;
type?: string;
};

const Block = ({
Expand All @@ -41,6 +42,7 @@ const Block = ({
picture,
progress,
highlightColor,
type,
}: Props) => {
const [isRemove, setIsRemove] = useState(true);
const { isModalOpen, openModal, handleYesClick, handleNoClick } = useModal();
Expand Down Expand Up @@ -104,6 +106,12 @@ const Block = ({
}
}}
>
{type === 'CHALLENGE' && (
<S.ChallengeTypeWrapper>
<p>도전! 챌린지</p>
</S.ChallengeTypeWrapper>
)}

<Flex justifyContent="space-between">
<h3>{title}</h3>
<span>{dDay}</span>
Expand Down
1 change: 1 addition & 0 deletions src/components/NotStartedDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const NotStartedDashboard = ({ list, id, dashboardId, onLoadMore }: Props) => {
picture={block.picture ?? ''}
progress={settings.progress ?? ''}
highlightColor={settings.highlightColor ?? ''}
type={block.type ?? ''}
/>
</div>
);
Expand Down
18 changes: 18 additions & 0 deletions src/styles/DashboardStyled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,24 @@ export const BlockContainer = styled.div<{
}
`;

export const ChallengeTypeWrapper = styled.p`
p {
background: linear-gradient(
90deg,
${theme.color.main},
${theme.color.main2},
${theme.color.main3}
);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/* p {
color: ${theme.color.gray};
} */
`;

export const UserName = styled.p`
font-size: ${theme.font.size.caption};
color: ${theme.color.gray};
Expand Down

0 comments on commit 5e7c48d

Please sign in to comment.