Slide 44
Slide 44 text
EZOBNJDܕͷ᠘
@JsModule("react-swipeable-views")
private external val reactSwipeableViewModule: dynamic
external interface ReactSwipeableProps : RProps {
var index: Int
var disabled: Boolean
var onChangeIndex: (Int, Int, ChangeReason) -> Unit
var onSwitching: (Int, String) -> Unit
}
fun ReactSwipeableProps.onChangeIndex(block: (Int, Int?, ReasonType?) -> Unit) {
onChangeIndex = { index: Int, indexLatest: Int, reason: ChangeReason ->
block(index, indexLatest, ReasonType.valueOf(reason.reason))
}
}
ʮPO$IBOHF*OEFYʹؔϦςϥϧΛೖʯΛ
,PUMJOͬΆ͘ॻ͚ΔΑ͏ʹ֦ͨ͠ுؔ