Skip to content

Commit

Permalink
HMA-7409: Added bold link text
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjwwalker committed Aug 23, 2023
1 parent d98feea commit 6641d3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
- Added bold link text to text styles

## [1.10.1] - 2023-08-18Z
- Added `isButton` trait to `CustomButton`
Expand Down
1 change: 1 addition & 0 deletions SUICompanionApp/SUICompanionApp/Atoms/ExampleAtoms.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extension Text: Examplable {
Text("H5 Text").style(.H5)
Text("Bold Text").style(.bold)
Text("Bold Error Text").style(.errorBold)
Text("Bold Link Text").style(.linkBold)
Text("Body Text").style(.body)
Text("Info Text").style(.info)
Text("Link Text").style(.link)
Expand Down
7 changes: 4 additions & 3 deletions Sources/SUIComponents/Atoms/Text+HMRC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum TextStyle {
case info
case debug
case link
case linkBold
case error
case errorBold

Expand All @@ -33,7 +34,7 @@ public enum TextStyle {
case .H3: return Font.H3.font()
case .H4: return Font.H4.font()
case .H5: return Font.H5.font()
case .bold, .errorBold: return Font.Bold.font()
case .bold, .linkBold, .errorBold: return Font.Bold.font()
case .body, .info, .link, .error: return Font.Body.font()
case .debug: return Font.Debug.font()
}
Expand All @@ -43,7 +44,7 @@ public enum TextStyle {
case .H3: return Font.H3.uiFont()
case .H4: return Font.H4.uiFont()
case .H5: return Font.H5.uiFont()
case .bold, .errorBold: return Font.Bold.uiFont()
case .bold, .linkBold, .errorBold: return Font.Bold.uiFont()
case .body, .info, .link, .error: return Font.Body.uiFont()
case .debug: return Font.Debug.uiFont()
}
Expand All @@ -52,7 +53,7 @@ public enum TextStyle {
switch self {
case .info, .debug:
return Color.Semantic.infoText
case .link:
case .link, .linkBold:
return Color.Semantic.linkText
case .error, .errorBold:
return Color.Semantic.errorText
Expand Down

0 comments on commit 6641d3d

Please sign in to comment.