diff --git a/CONFIG.md b/CONFIG.md index c53bb8c..3cb035f 100644 --- a/CONFIG.md +++ b/CONFIG.md @@ -90,7 +90,7 @@ ios: # [optional] Parameters for exporting colors colors: - # How to export colors? Use .xcassets and UIColor extension (useColorAssets = true) or extension only (useColorAssets = false) + # How to export colors? Use .xcassets and UIColor/Color extension (useColorAssets = true) or UIColor/Color extension only (useColorAssets = false) useColorAssets: true # [required if useColorAssets: True] Name of the folder inside Assets.xcassets where to place colors (.colorset directories) assetsFolder: Colors diff --git a/FigmaExport.podspec b/FigmaExport.podspec index 9444efc..d16fa38 100644 --- a/FigmaExport.podspec +++ b/FigmaExport.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "FigmaExport" - spec.version = "0.35.2" + spec.version = "0.36.0" spec.summary = "Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project." spec.homepage = "https://github.com/RedMadRobot/figma-export" spec.license = { type: "MIT", file: "LICENSE" } diff --git a/README.md b/README.md index 4f013bf..32641d5 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,9 @@ For SwiftUI the following Swift file will be created to use colors from the code ``` If you set option `useColorAssets: False` in the configuration file, then will be generated code like this: + +UIKit: + ```swift import UIKit @@ -122,6 +125,16 @@ extension UIColor { } ``` +SwiftUI: + +```swift +import SwiftUI + +public extension ShapeStyle where Self == Color { + static var primaryText: Color { Color(red: 1.000, green: 1.000, blue: 1.000, opacity: 1.000) } +} +``` + #### Icons Icons will be exported as PDF or SVG files with `Template Image` render mode. diff --git a/Sources/FigmaExport/main.swift b/Sources/FigmaExport/main.swift index 0c9369b..feab83c 100644 --- a/Sources/FigmaExport/main.swift +++ b/Sources/FigmaExport/main.swift @@ -31,7 +31,7 @@ enum FigmaExportError: LocalizedError { struct FigmaExportCommand: ParsableCommand { - static let version = "0.35.2" + static let version = "0.36.0" static let svgFileConverter = VectorDrawableConverter() static let fileWriter = FileWriter()