Tarun Chawla
05/04/2021, 3:38 PM<Prev Button/a> <Image> <Next Button/a>
Am using Bulma css framework to design things. Do you have any suggestions which I should take care while implementing it?Tarun Chawla
05/05/2021, 12:07 PMTarun Chawla
05/05/2021, 12:10 PMoverride fun RBuilder.render() {
div("section") {
div("container") {
div("columns") {
div("column is-two-thirds") {
div("card") {
div("card-image") {
figure("image is-4by3") {
val imageUrl = if ((props.imagesList.size > 0) && (state.currentImage < props.imagesList.size)) props.imagesList.get(state.currentImage) else ""
println("image url = $imageUrl")
img(src = imageUrl) {
}
}
}
div("card-content is-overlay has-text-danger") {
span("icon is-size-1") {
attrs.onClickFunction = {
println("left clicked")
setState {
currentImage = if (currentImage > 0) currentImage-1 else props.imagesList.size-1
}
}
i("fas fa-caret-square-left") {
}
}
span("icon is-pulled-right is-size-1") {
attrs.onClickFunction = {
println("right clicked")
setState {
currentImage = if (currentImage < props.imagesList.size-1) currentImage+1 else 0
}
}
i("fas fa-caret-square-right") {
}
}
}
}
}
}
}
}
}