Skip to content

Commit

Permalink
Merge pull request #645 from urfit-tech/feat/add-programPackagePlanCa…
Browse files Browse the repository at this point in the history
…rd-CountDownTimeBlock

feat: add programPackagePlanCard CountDownTimeBlock
  • Loading branch information
Ponchimeow authored Jan 7, 2025
2 parents ef62af0 + 7d32363 commit a9e3fc4
Show file tree
Hide file tree
Showing 4 changed files with 857 additions and 32 deletions.
14 changes: 14 additions & 0 deletions src/components/package/ProgramPackagePlanCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ProgramPackagePlanProps } from '../../types/programPackage'
import PaymentButton from '../common/PaymentButton'
import PriceLabel from 'lodestar-app-element/src/components/labels/PriceLabel'
import { BraftContent } from 'lodestar-app-element/src/components/common/StyledBraftEditor'
import CountDownTimeBlock from '../common/CountDownTimeBlock'

const StyledCard = styled.div`
padding: 1.5rem;
Expand All @@ -33,6 +34,13 @@ const StyledEnrollment = styled.div`
letter-spacing: 0.18px;
`

const StyledCountDownBlock = styled.div`
margin-top: 20px;
span {
font-size: 14px;
}
`

const ProgramPackagePlanCard: React.VFC<
ProgramPackagePlanProps & {
programPackageId: string
Expand All @@ -46,6 +54,7 @@ const ProgramPackagePlanCard: React.VFC<
description,
isSubscription,
isParticipantsVisible,
isCountdownTimerVisible,
periodAmount,
periodType,
listPrice,
Expand All @@ -71,6 +80,11 @@ const ProgramPackagePlanCard: React.VFC<
periodType={isSubscription ? periodType : undefined}
periodAmount={isSubscription ? periodAmount : undefined}
/>
{isCountdownTimerVisible && soldAt && isOnSale && (
<StyledCountDownBlock>
<CountDownTimeBlock expiredAt={soldAt} />
</StyledCountDownBlock>
)}
<Divider className="my-3" />
{!isSubscription && periodAmount && periodType && (
<StyledHighlight className="mb-3">
Expand Down
Loading

0 comments on commit a9e3fc4

Please sign in to comment.