This package wraps Bootstrap elements into convenient Leaf-Tags.
Add LeafBootstrap
to the package dependencies (in your Package.swift
file):
.package(url: "https://github.com/brokenhandsio/leaf-bootstrap.git", from: "1.0.0-beta")
as well as to your target:
.product(name: "LeafBootstrap", package: "leaf-bootstrap")
First import LeafBootstrap and Leaf inside your configure.swift
import LeafBootstrap
import Leaf
In order to render the Bootstrap elements, you will need to add the Bootstrap Leaf tags:
app.leaf.useBootstrapTags()
#bsAlert(style? = primary, classes?, attributes?):
some alert text
#endbsAlert
#bsBadge(type? = primary, classExtras?, attributes?):
badge text
#endbsBadge
#bsButton(type? = primary, classExtras?, attributes?):
btn text
#endbsButton
#bsInput(type?, classExtras?, attributes?)
#bsTextArea(classExtras?, attributes?):
some textarea text
#endbsTextArea
#bsCheckbox(classExtras?, attributes?)
#bsFileInput(classExtras?, attributes?)