-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(FontWeight): Added brandeable FontWeights
- Loading branch information
1 parent
5afa182
commit d4280c2
Showing
20 changed files
with
195 additions
and
195 deletions.
There are no files selected for viewing
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,99 @@ | ||
// | ||
// FontStyle+Weights.swift | ||
// | ||
// Made with ❤️ by Novum | ||
// | ||
// Copyright © Telefonica. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import UIKit | ||
|
||
public extension FontStyle { | ||
enum TextPreset1Weight: CaseIterable { | ||
case regular, medium | ||
|
||
var value: MisticaFontWeightType { | ||
switch self { | ||
case .regular: return .regular | ||
case .medium: return .medium | ||
} | ||
} | ||
} | ||
|
||
enum TextPreset2Weight: CaseIterable { | ||
case regular, medium | ||
|
||
var value: MisticaFontWeightType { | ||
switch self { | ||
case .regular: return .regular | ||
case .medium: return .medium | ||
} | ||
} | ||
} | ||
|
||
enum TextPreset3Weight: CaseIterable { | ||
case light, regular, medium | ||
|
||
var value: MisticaFontWeightType { | ||
switch self { | ||
case .light: return .light | ||
case .regular: return .regular | ||
case .medium: return .medium | ||
} | ||
} | ||
} | ||
|
||
enum TextPreset4Weight: CaseIterable { | ||
case light, regular, medium, cardTitle | ||
|
||
var value: MisticaFontWeightType { | ||
switch self { | ||
case .light: return .light | ||
case .regular: return .regular | ||
case .medium: return .medium | ||
case .cardTitle: return MisticaConfig.currentFontWeights.cardTitlePreset | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct MovistarFontWeights: MisticaFontWeights { | ||
public var cardTitlePreset: MisticaFontWeightType = .bold | ||
public var textPreset5: MisticaFontWeightType = .bold | ||
public var textPreset6: MisticaFontWeightType = .bold | ||
public var textPreset7: MisticaFontWeightType = .bold | ||
public var textPreset8: MisticaFontWeightType = .bold | ||
public var textPreset9: MisticaFontWeightType = .bold | ||
public var textPreset10: MisticaFontWeightType = .bold | ||
} | ||
|
||
struct O2FontWeights: MisticaFontWeights { | ||
public var cardTitlePreset: MisticaFontWeightType = .regular | ||
public var textPreset5: MisticaFontWeightType = .light | ||
public var textPreset6: MisticaFontWeightType = .light | ||
public var textPreset7: MisticaFontWeightType = .light | ||
public var textPreset8: MisticaFontWeightType = .light | ||
public var textPreset9: MisticaFontWeightType = .light | ||
public var textPreset10: MisticaFontWeightType = .light | ||
} | ||
|
||
struct BlauFontWeights: MisticaFontWeights { | ||
public var cardTitlePreset: MisticaFontWeightType = .regular | ||
public var textPreset5: MisticaFontWeightType = .light | ||
public var textPreset6: MisticaFontWeightType = .light | ||
public var textPreset7: MisticaFontWeightType = .light | ||
public var textPreset8: MisticaFontWeightType = .light | ||
public var textPreset9: MisticaFontWeightType = .light | ||
public var textPreset10: MisticaFontWeightType = .light | ||
} | ||
|
||
struct VivoFontWeights: MisticaFontWeights { | ||
public var cardTitlePreset: MisticaFontWeightType = .regular | ||
public var textPreset5: MisticaFontWeightType = .light | ||
public var textPreset6: MisticaFontWeightType = .light | ||
public var textPreset7: MisticaFontWeightType = .light | ||
public var textPreset8: MisticaFontWeightType = .light | ||
public var textPreset9: MisticaFontWeightType = .light | ||
public var textPreset10: MisticaFontWeightType = .light | ||
} |
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
Oops, something went wrong.