io.docops.asciidoc.buttons.PillButtonRenderer.kt Maven / Gradle / Ivy
package io.docops.asciidoc.buttons
import io.docops.asciidoc.buttons.models.Button
import io.docops.asciidoc.buttons.theme.Theme
import io.docops.asciidoc.utils.escapeXml
class PillButtonRenderer : AbstractButtonRenderer() {
override fun drawButtons(buttonList: MutableList>, theme: Theme): String {
val sb = StringBuilder("")
buttonList.forEachIndexed { index, buttons ->
sb.append(drawPills(index, buttons, theme))
}
sb.append(" ")
return sb.toString()
}
private fun drawPills(index: Int, buttons: MutableList