mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -16,7 +16,9 @@ public extension Color {
|
||||
|
||||
public extension ShapeStyle where Self == Color {
|
||||
/// The colours used by Element as defined in Compound Design Tokens.
|
||||
static var compound: CompoundColors { Self.compound }
|
||||
static var compound: CompoundColors {
|
||||
Self.compound
|
||||
}
|
||||
}
|
||||
|
||||
/// The colours used by Element as defined in Compound Design Tokens.
|
||||
@@ -100,7 +102,9 @@ public class CompoundColors {
|
||||
|
||||
private extension UITraitCollection {
|
||||
/// Whether or not the trait collection contains a `userInterfaceStyle` of `.light`.
|
||||
var isLight: Bool { userInterfaceStyle == .light }
|
||||
var isLight: Bool {
|
||||
userInterfaceStyle == .light
|
||||
}
|
||||
}
|
||||
|
||||
public struct DecorativeColor: Equatable {
|
||||
|
||||
@@ -17,22 +17,30 @@ public extension Gradient {
|
||||
/// The gradients used by Element as defined in Compound Design Tokens.
|
||||
/// This struct only contains the gradients assembled from the individual colour stops.
|
||||
public struct CompoundGradients {
|
||||
// We need to use computed properties here so that the gradients include the
|
||||
// latest token overrides that have been applied since the struct was created.
|
||||
public var action: Gradient { .init(colors: [.compound.gradientActionStop1,
|
||||
.compound.gradientActionStop2,
|
||||
.compound.gradientActionStop3,
|
||||
.compound.gradientActionStop4]) }
|
||||
public var subtle: Gradient { .init(colors: [.compound.gradientSubtleStop1,
|
||||
.compound.gradientSubtleStop2,
|
||||
.compound.gradientSubtleStop3,
|
||||
.compound.gradientSubtleStop4,
|
||||
.compound.gradientSubtleStop5,
|
||||
.compound.gradientSubtleStop6]) }
|
||||
public var info: Gradient { .init(colors: [.compound.gradientInfoStop1,
|
||||
.compound.gradientInfoStop2,
|
||||
.compound.gradientInfoStop3,
|
||||
.compound.gradientInfoStop4,
|
||||
.compound.gradientInfoStop5,
|
||||
.compound.gradientInfoStop6]) }
|
||||
/// We need to use computed properties here so that the gradients include the
|
||||
/// latest token overrides that have been applied since the struct was created.
|
||||
public var action: Gradient {
|
||||
.init(colors: [.compound.gradientActionStop1,
|
||||
.compound.gradientActionStop2,
|
||||
.compound.gradientActionStop3,
|
||||
.compound.gradientActionStop4])
|
||||
}
|
||||
|
||||
public var subtle: Gradient {
|
||||
.init(colors: [.compound.gradientSubtleStop1,
|
||||
.compound.gradientSubtleStop2,
|
||||
.compound.gradientSubtleStop3,
|
||||
.compound.gradientSubtleStop4,
|
||||
.compound.gradientSubtleStop5,
|
||||
.compound.gradientSubtleStop6])
|
||||
}
|
||||
|
||||
public var info: Gradient {
|
||||
.init(colors: [.compound.gradientInfoStop1,
|
||||
.compound.gradientInfoStop2,
|
||||
.compound.gradientInfoStop3,
|
||||
.compound.gradientInfoStop4,
|
||||
.compound.gradientInfoStop5,
|
||||
.compound.gradientInfoStop6])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,5 +53,7 @@ public class CompoundUIColors {
|
||||
|
||||
private extension UITraitCollection {
|
||||
/// Whether or not the trait collection contains a `userInterfaceStyle` of `.light`.
|
||||
var isLight: Bool { userInterfaceStyle == .light }
|
||||
var isLight: Bool {
|
||||
userInterfaceStyle == .light
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user