diff options
Diffstat (limited to 'kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft')
-rw-r--r-- | kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt index 450d4466..ac0e9836 100644 --- a/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt +++ b/kvision-modules/kvision-bootstrap-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/Spinner.kt @@ -25,6 +25,7 @@ import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.form.FieldLabel +import pl.treksoft.kvision.form.FormHorizontalRatio import pl.treksoft.kvision.form.InvalidFeedback import pl.treksoft.kvision.form.NumberFormControl import pl.treksoft.kvision.html.ButtonStyle @@ -243,13 +244,13 @@ open class Spinner( input.blur() } - override fun styleForHorizontalFormPanel() { + override fun styleForHorizontalFormPanel(horizontalRatio: FormHorizontalRatio) { addCssClass("row") - flabel.addCssClass("col-sm-2") + flabel.addCssClass("col-sm-${horizontalRatio.labels}") flabel.addCssClass("col-form-label") - input.addSurroundingCssClass("col-sm-10") - invalidFeedback.addCssClass("offset-sm-2") - invalidFeedback.addCssClass("col-sm-10") + input.addSurroundingCssClass("col-sm-${horizontalRatio.fields}") + invalidFeedback.addCssClass("offset-sm-${horizontalRatio.labels}") + invalidFeedback.addCssClass("col-sm-${horizontalRatio.fields}") } companion object { |