bsplus icon indicating copy to clipboard operation
bsplus copied to clipboard

Compatibility with Bootstrap 5

Open mubashirqasim opened this issue 2 years ago • 0 comments

Great package. I am developing with Bootstrap 5. Some of the functions are not available with bootstrap 5. I wonder if there is any way to update the package compatibility with Bootstrap 5.

library(shiny)
library(bsplus)

ui <- fluidPage(
  
  theme = bs_theme(bootswatch = "sandstone", version = 5),
  
  # activate tooltips, popovers, and MathJax
  use_bs_tooltip(),
  use_bs_popover(),
  
  # Application title
  titlePanel("Tooltips, Popovers, and Modals"),
  
  # Sidebar with a slider input for number of bins
  sidebarLayout(
    sidebarPanel(
      numericInput("number", label = "Label with tooltip help", value = 0) %>%
        shinyInput_label_embed( icon("info") %>% bs_embed_tooltip(title = "Not a complex number")),
      
      selectInput("letter", label = "Label with popover help", choices = c("a", "b", "c")) %>%
        shinyInput_label_embed(shiny_iconlink() %>% bs_embed_popover(
          title = "Letter", content = "Choose a favorite", placement = "left")),
      
      bs_modal("modal_equation", title = "Equations", 
               body = includeMarkdown(system.file("markdown", "modal.md", package = "bsplus")),
               size = "medium"),
      
      selectInput(inputId = "equation", label = "Label with modal help", 
                  choices = c("F = ma", "E = mc^2")) %>%
        shinyInput_label_embed( shiny_iconlink() %>% bs_attach_modal(id_modal = "modal_equation"))
    ),
    mainPanel(
      textOutput("number"),
      textOutput("letter"),
      textOutput("equation")
    )
  )
)

server <- function(input, output, session) {}

# Run the application
shinyApp(ui = ui, server = server)

mubashirqasim avatar Aug 24 '22 02:08 mubashirqasim