Skip to content

Commit

Permalink
Allow building code for tvOS and watchOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
objecthub committed May 12, 2024
1 parent e113228 commit 8f17ab3
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Sources/MarkdownKit/AttributedString/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
}
}

public let mdDefaultColor = UIColor.darkText.hexString
public let mdDefaultBackgroundColor = UIColor.systemBackground.hexString

#elseif os(macOS)

import Cocoa
Expand All @@ -68,3 +65,20 @@
public let mdDefaultBackgroundColor = NSColor.textBackgroundColor.hexString

#endif

#if os(iOS)

public let mdDefaultColor = UIColor.label.hexString
public let mdDefaultBackgroundColor = UIColor.systemBackground.hexString

#elseif os(tvOS)

public let mdDefaultColor = UIColor.label.hexString
public let mdDefaultBackgroundColor = UIColor.white.hexString

#elseif os(watchOS)

public let mdDefaultColor = UIColor.black.hexString
public let mdDefaultBackgroundColor = UIColor.white.hexString

#endif

0 comments on commit 8f17ab3

Please sign in to comment.