Skip to content

Commit

Permalink
Merge pull request #20 from team-aliens/refactor/19-dms-font
Browse files Browse the repository at this point in the history
merge :: DMSFontStyle 리팩토링
  • Loading branch information
baekteun authored Sep 21, 2022
2 parents aa04a28 + 0976662 commit 3d358c5
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ public enum DMSFontStyle {
}
}

// MARK: - Title
public extension DMSFontStyle.Title {
// MARK: - FontableSize
extension DMSFontable where Self: RawRepresentable, Self.RawValue == CGFloat {
var size: CGFloat {
self.rawValue
}
}

// MARK: - Title
public extension DMSFontStyle.Title {
var weight: Font.Weight {
switch self {
case .extraLarge, .large, .medium, .extraSmall:
Expand All @@ -47,10 +50,6 @@ public extension DMSFontStyle.Title {

// MARK: - Text
public extension DMSFontStyle.Text {
var size: CGFloat {
self.rawValue
}

var weight: Font.Weight {
switch self {
case .twoExtraLarge, .extraLarge, .large, .medium, .small, .extraSmall, .twoExtraSmall:
Expand Down

0 comments on commit 3d358c5

Please sign in to comment.