1*af2ec015STomasz Sapeta // Copyright 2021-present 650 Industries. All rights reserved.
2*af2ec015STomasz Sapeta 
3*af2ec015STomasz Sapeta import CoreGraphics
4*af2ec015STomasz Sapeta import ABI49_0_0ExpoModulesCore
5*af2ec015STomasz Sapeta 
6*af2ec015STomasz Sapeta public class LinearGradientModule: Module {
definitionnull7*af2ec015STomasz Sapeta   public func definition() -> ModuleDefinition {
8*af2ec015STomasz Sapeta     Name("ExpoLinearGradient")
9*af2ec015STomasz Sapeta 
10*af2ec015STomasz Sapeta     View(LinearGradientView.self) {
11*af2ec015STomasz Sapeta       Prop("colors") { (view: LinearGradientView, colors: [CGColor]) in
12*af2ec015STomasz Sapeta         view.gradientLayer.setColors(colors)
13*af2ec015STomasz Sapeta       }
14*af2ec015STomasz Sapeta 
15*af2ec015STomasz Sapeta       Prop("startPoint") { (view: LinearGradientView, startPoint: CGPoint?) in
16*af2ec015STomasz Sapeta         view.gradientLayer.setStartPoint(startPoint)
17*af2ec015STomasz Sapeta       }
18*af2ec015STomasz Sapeta 
19*af2ec015STomasz Sapeta       Prop("endPoint") { (view: LinearGradientView, endPoint: CGPoint?) in
20*af2ec015STomasz Sapeta         view.gradientLayer.setEndPoint(endPoint)
21*af2ec015STomasz Sapeta       }
22*af2ec015STomasz Sapeta 
23*af2ec015STomasz Sapeta       Prop("locations") { (view: LinearGradientView, locations: [CGFloat]?) in
24*af2ec015STomasz Sapeta         view.gradientLayer.setLocations(locations)
25*af2ec015STomasz Sapeta       }
26*af2ec015STomasz Sapeta     }
27*af2ec015STomasz Sapeta   }
28*af2ec015STomasz Sapeta }
29