Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Tab does not seem to recognize Icon property correctly #98

Open
1 task done
mviertel opened this issue Mar 18, 2024 · 0 comments
Open
1 task done

[Bug]: Tab does not seem to recognize Icon property correctly #98

mviertel opened this issue Mar 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mviertel
Copy link

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

No response

Platform and OS Version

No response

Existing Issues

No response

What happened?

Icons dont seem to render properly. Using the example from the showcase, different ways of adding icons don´t lead to success. See a working example below. I also added a navbar with buttons to show that the icons where defined correctly.

`library(shiny)
library(shiny.blueprint)

ui_mod <- function(id) {
ns <- NS(id)

reactOutput(ns("tabs"))
}

server_mod <- function(id) {
moduleServer(id, function(input, output, session) {
ns <- session$ns

currentTab <- reactiveVal("react")
observeEvent(input$selectTab, currentTab(input$selectTab))
output$tabs <- renderReact(
  tagList(
    Tabs(
      selectedTabId = currentTab(),
      onChange = setInput(ns("selectTab")),
      Tab(id = "angular", title = "Angular", panel = "Angular",icon('bolt-lightning')),
      Tab(id = "ember", title = "Ember", panel = "Ember",icon = tags$i(class = "fa-solid fa-triangle-exclamation")),
      Tab(id = "react", title = "React", panel = "React", icon = 'home'),
      TabsExpander(),
      tags$input(class = "bp4-input", type = "text", placeholder = "Search...")
    ),
    shiny.blueprint::Navbar(
      shiny.blueprint::NavbarGroup(
        shiny.blueprint::NavbarHeading("Supply"),
        shiny.blueprint::NavbarDivider(),
        shiny.blueprint::Button.shinyInput(
          inputId = ns('nav_angular'),
          minimal = TRUE,
          icon = icon('bolt-lightning'),
          text = "Angular"
        ),
        shiny.blueprint::Button.shinyInput(
          inputId = ns('nav_ember'),
          minimal = TRUE,
          icon = tags$i(class = "fa-solid fa-triangle-exclamation"),
          text = "Availability"
        ),
        shiny.blueprint::Button.shinyInput(
          inputId = ns('na_react'),
          minimal = TRUE,
          icon = 'home',
          text = "React"
        )


      )
    )
  )

)

})
}

Define UI for application that draws a histogram

ui <- fluidPage(

ui_mod('test')

)

Define server logic required to draw a histogram

server <- function(input, output) {

server_mod('test')

}

Run the application

shinyApp(ui = ui, server = server)`

Steps to reproduce

...

Expected behavior

Icons to render

Attachments

No response

Screenshots or Videos

Screenshot 2024-03-18 082149

Additional Information

No response

@mviertel mviertel added the bug Something isn't working label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant