diff --git a/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.styles.ts b/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.styles.ts new file mode 100644 index 00000000..e3d37988 --- /dev/null +++ b/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.styles.ts @@ -0,0 +1,70 @@ +import styled from 'styled-components'; +import { Link } from 'react-router'; +import SvgSystemWarning from '@/shared/assets/svgs/icon/SystemWarning'; +import { getToken, applyTypography } from '@/shared/design-system'; + +export const Container = styled(Link)` + display: flex; + flex-direction: column; + /* HACK: Figma gap 14px, 가장 가까운 gap.5(12px) 사용 */ + gap: ${getToken('gap.5')}; + width: 100%; + background: ${getToken('fill.neutral')}; + border-radius: ${getToken('radius.xl')}; + /* HACK: Figma py 18px, 가장 가까운 padding.6(20px) 사용 */ + padding: ${getToken('padding.6')}; + text-decoration: none; + color: inherit; +`; + +export const TextGroup = styled.div` + display: flex; + flex-direction: column; +`; + +export const GroupName = styled.span` + ${applyTypography('typography.body.medium')} + color: ${getToken('fg.alternative')}; +`; + +export const Amount = styled.span` + ${applyTypography('typography.heading.small')} + color: ${getToken('fg.normal')}; +`; + +export const ProgressSection = styled.div` + display: flex; + flex-direction: column; + gap: ${getToken('gap.4')}; +`; + +export const ProgressBar = styled.div` + position: relative; + width: 100%; + height: 0.5rem; + overflow: hidden; +`; + +export const ProgressTrack = styled.div` + position: absolute; + inset: 0; + border-radius: ${getToken('radius.full')}; + /* 대응되는 시맨틱 토큰이 없어 Figma 지정값 사용 */ + background: #d6d6d6; +`; + +export const MessageRow = styled.div` + display: flex; + align-items: center; + justify-content: flex-end; + gap: ${getToken('gap.2')}; +`; + +export const WarningIcon = styled(SvgSystemWarning)` + color: ${getToken('fg.accent-yellow.normal')}; +`; + +export const Message = styled.span` + ${applyTypography('typography.body.small-semibold')} + color: ${getToken('fg.assistive')}; +`; diff --git a/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.tsx b/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.tsx new file mode 100644 index 00000000..7160bf4e --- /dev/null +++ b/src/pages/home/ui/EmptySettlementCard/EmptySettlementCard.tsx @@ -0,0 +1,38 @@ +import * as S from './EmptySettlementCard.styles'; + +interface EmptySettlementCardProps { + groupCode: string; + groupName: string; +} + +function EmptySettlementCard({ + groupCode, + groupName, +}: EmptySettlementCardProps) { + return ( + + + {groupName} + 0원 + + + + + + + + 아직 정산 내역을 입력하지 않았어요 + + + + ); +} + +export { EmptySettlementCard }; +export type { EmptySettlementCardProps }; diff --git a/src/pages/home/ui/EmptySettlementCard/index.ts b/src/pages/home/ui/EmptySettlementCard/index.ts new file mode 100644 index 00000000..750f61d7 --- /dev/null +++ b/src/pages/home/ui/EmptySettlementCard/index.ts @@ -0,0 +1,2 @@ +export { EmptySettlementCard } from './EmptySettlementCard'; +export type { EmptySettlementCardProps } from './EmptySettlementCard'; diff --git a/src/pages/home/ui/SettlementDateSection/SettlementDateSection.tsx b/src/pages/home/ui/SettlementDateSection/SettlementDateSection.tsx index 3081ec63..74bb7f91 100644 --- a/src/pages/home/ui/SettlementDateSection/SettlementDateSection.tsx +++ b/src/pages/home/ui/SettlementDateSection/SettlementDateSection.tsx @@ -1,4 +1,5 @@ import type { SettlementGroup } from '@/entities/group/model/group.type'; +import { EmptySettlementCard } from '../EmptySettlementCard'; import { SettlementProgressCard } from '../SettlementProgressCard'; import * as S from './SettlementDateSection.styles'; @@ -12,16 +13,24 @@ function SettlementDateSection({ date, items }: SettlementDateSectionProps) { {date} - {items.map((item) => ( - - ))} + {items.map((item) => + item.totalAmount === 0 ? ( + + ) : ( + + ) + )} );