feat(ColorBridge): add Color initialize availablility for macOS

This commit is contained in:
hank121314 2022-06-07 09:23:57 +08:00
parent bd8613fe27
commit d9829395ac
1 changed files with 5 additions and 5 deletions

View File

@ -442,11 +442,11 @@ extension Defaults {
return nil
}
#if os(macOS)
return Value(cgColor)
#else
return Value(cgColor: cgColor)
#endif
if #available(macOS 12.0, macOSApplicationExtension 12.0, *) {
return Value(cgColor: cgColor)
} else {
return Value(cgColor)
}
}
}
}