context("button")
test_that("throws error", {
expect_error(bs_button("foo", button_type = "bar"))
})
button <- bs_button("Click me", button_type = "primary", button_size = "small")
test_that("button works", {
expect_identical(
.tag_validate(
button,
name = "button",
class = "btn btn-primary btn-sm"
),
button
)
expect_identical(
"Click me",
button$children[[1]]
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.