JohnCoene / tippy

💬 Tippy.js for Shiny
http://tippy.john-coene.com/
Other
77 stars 2 forks source link

increase font size tippy_this #7

Closed mfumagalli68 closed 4 years ago

mfumagalli68 commented 4 years ago

Hi john thanks for the package.

I'm using tippyinside Shiny. Using the function with_tippy i'd like to be able to increase the size of the tip text as it's very very small.

An example:

In ui.R:

library(shiny)
library(tippy)
library(shinydashboard)

header<-dashboardHeader('example')
sidebar<-dashboardSidebar(
           radioButtons("checkboxfatt","Filtro fatturato",
                        choices = c("SI","NO"),
                        selected="NO")

           tippy_this(elementId = "checkboxfatt",
                      tooltip = "tessst", allowHTML = TRUE,
                      width='25px',height='25px',
                      placement = "right"),

body<-dashboardBody()
dashboardPage(header, sidebar, body)

As indicated in #1 width and weight args doesn't work. Any solution?

JohnCoene commented 4 years ago

An overhaul of the package is well overdue. I'll look into more elegant solutions fairly soon. In the meantime the easiest way is to use html where one can use CSS styles.

Below is an example with tippy_this and with_tippy

library(shiny)
library(tippy)
library(shinydashboard)

header <- dashboardHeader(title = 'example')
sidebar <- dashboardSidebar(
  radioButtons(
    "checkboxfatt","Filtro fatturato",
    choices = c("SI","NO"),
    selected="NO"
  ),
  tippy_this(
    elementId = "checkboxfatt",
    tooltip = "<span style='font-size:20px;'>tessst<span>", allowHTML = TRUE,
    placement = "right"
  )
)

body <- dashboardBody(
  with_tippy(
    h2("Some content"),
    tooltip = "<span style='font-size:20px;'>Some tooltip<span>", allowHTML = TRUE
  )
)

ui <- dashboardPage(header, sidebar, body)

server <- function(input, output){}

shinyApp(ui, server)

Does this help?

mfumagalli68 commented 4 years ago

Yesss.

Thanks for the prompt response.

JohnCoene commented 4 years ago

You're welcome! Don't hesitate to open other issues if you have any question.