package com.vahesaroyanreactnativebubbleselect import com.facebook.react.bridge.ReadableMap import com.facebook.react.uimanager.SimpleViewManager import com.facebook.react.uimanager.ThemedReactContext import com.facebook.react.uimanager.annotations.ReactProp class BubbleSelectNodeViewManager: SimpleViewManager() { override fun getName(): String { return "RNBubbleSelectNodeView" } override fun createViewInstance(reactContext: ThemedReactContext): BubbleSelectNodeView { return BubbleSelectNodeView(reactContext) } @ReactProp(name = "text") fun setText(view: BubbleSelectNodeView, text: String?) { if (text == null) return view.text = text } @ReactProp(name = "image") fun setImage(view: BubbleSelectNodeView, image: String?) { if (image == null) return view.image = image } @ReactProp(name = "id") fun setId(view: BubbleSelectNodeView, id: String?) { if (id == null) return view.id = id } @ReactProp(name = "fontFamily") fun setFontFamily(view: BubbleSelectNodeView, fontFamily: String?) { view.fontFamily = fontFamily } @ReactProp(name = "fontStyle") fun setFontStyle(view: BubbleSelectNodeView, fontStyle: String?) { view.run { setFontStyle(fontStyle) } } @ReactProp(name = "fontColor") fun setFontColor(view: BubbleSelectNodeView, fontColor: String?) { if (fontColor == null) return; view.fontColor = fontColor } @ReactProp(name = "color") fun setColor(view: BubbleSelectNodeView, color: String?) { view.color = color } @ReactProp(name = "gradient") fun setGradient(view: BubbleSelectNodeView, gradient: ReadableMap?) { view.gradient = gradient } }