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