GithubHelp home page GithubHelp logo

Comments (3)

DivadNojnarg avatar DivadNojnarg commented on August 16, 2024 1

Yup that could be. This is what I am currently doing on all other RinteRface package to allow for more interactivity

from argondash.

sarthi2395 avatar sarthi2395 commented on August 16, 2024

Do you have a gist available as an example?

from argondash.

DivadNojnarg avatar DivadNojnarg commented on August 16, 2024

Something really quick and dirty before I push a fix:

library(shiny)
library(argon)
library(argonR)


argonDropdownItem <- function (inputId = NULL, name = NULL, description = NULL, src = NULL, icon = NULL, 
                               status = NULL) {
  
  itemCl <- "media d-flex align-items-center"
  
  # add class action-button to rely on the existing shiny input binding
  if (!is.null(inputId)) {
    itemCl <- paste0(itemCl, " btn action-button")
  }
  
  tags$a(
    id = if (!is.null(inputId)) inputId, 
    class = itemCl, 
    href = src, 
    if (!is.null(icon)) {
      argonIconWrapper(
        iconTag = icon, gradient_color = status, 
        circle = TRUE, size = NULL, status = status, 
        shadow = FALSE, hover_shadow = FALSE)
    },
    tags$div(
      class = "media-body ml-3",
      tags$h6(class = paste0("heading text-", status, " mb-md-1"), name), 
      tags$p(class = "description d-none d-md-inline-block mb-0", description)
    )
  )
}



shinyApp(
  ui = argonDashPage(
    navbar = argonDashNavbar(
      argonDropNav(
        title = "Menu",
        argonDropdownItem(inputId = "test", name = "Hello")
      )
    ),
    sidebar = argonDashSidebar(
      id = "sidebar",
      side = "left",
      size = "md",
      skin = "light"
    ),
    body = argonDashBody("Hello World")
  ),
  server = function(input, output) {
    observeEvent(input$test, {
      showNotification("plop")
    })
  }
)

from argondash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.