test_that("basic test", {
badge <- f7Badge("mybadge")
expect_true(inherits(badge, "shiny.tag"))
expect_equal(badge$name, "span")
expect_equal(badge$attribs$class, "badge")
# with color
badgeColor <- f7Badge("hello", color = "red")
expect_equal(badgeColor$attribs$class, "badge color-red")
expect_error(f7Badge("hello", color = "diamonds"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.