-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90fdbc7
commit ae814bf
Showing
7 changed files
with
134 additions
and
66 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// G1G1Banner.swift | ||
// Habitica | ||
// | ||
// Created by Phillip Thelen on 11.09.24. | ||
// Copyright © 2024 HabitRPG Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct G1G1Banner: View { | ||
var endDate: Date | ||
|
||
private let formatter = DateFormatter() | ||
|
||
var body: some View { | ||
HStack { | ||
Image(Asset.promoGiftsLeft.name) | ||
VStack { | ||
Text(L10n.giftOneGetOneTitle) | ||
.font(.system(size: 22, weight: .bold)) | ||
Text(L10n.giftOneGetOneDescriptionDate(formatter.string(from: endDate))) | ||
.font(.system(size: 16, weight: .semibold)) | ||
.multilineTextAlignment(.center) | ||
} | ||
Image(Asset.promoGiftsRight.name) | ||
}.background(LinearGradient(colors: [Color("#3BCAD7"), Color("#925CF3")], startPoint: .topLeading, endPoint: .bottomTrailing)) | ||
} | ||
} | ||
|
||
#Preview { | ||
G1G1Banner(endDate: Date()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters