-
Notifications
You must be signed in to change notification settings - Fork 77
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
F7Fab "plus" icon always displayed #230
Comments
Exact, according to the doc: extended: If TRUE, the FAB will be wider. This allows to use a label (see below).
label: Container label. Only if extended is TRUE. label only works if extended is TRUE. label could theoretically accept icon but this would not render well with the existing icon: f7Fabs(
extended = TRUE,
label = "Menu",
position = "center-top",
color = "yellow",
sideOpen = "right",
lapply(1:4, function(i) f7Fab(paste0("btn", i), i))
) If you want to use another set of icon than + and x, you can modify f7Fabs <- function (..., id = NULL, position = c("right-top", "right-center",
"right-bottom", "left-top", "left-center", "left-bottom",
"center-center", "center-top", "center-bottom"), color = NULL,
extended = FALSE, label = NULL, sideOpen = c("left", "right",
"top", "bottom", "center"), morph = FALSE, morphTarget = NULL)
{
position <- match.arg(position)
fabCl <- paste0("fab fab-", position, if (!is.null(color))
" color-", color)
if (extended)
fabCl <- paste0(fabCl, " fab-extended")
if (morph)
fabCl <- paste0(fabCl, " fab-morph")
sideOpen <- match.arg(sideOpen)
shiny::tags$div(class = fabCl, id = id, `data-morph-to` = if (morph)
morphTarget
else NULL, shiny::a(href = "#", f7Icon(<ICON_1>), f7Icon(<ICON_2>),
if (!is.null(label)) {
shiny::tags$div(class = "fab-text", label)
}), if (length(list(...)) > 0) {
shiny::tags$div(class = paste0("fab-buttons fab-buttons-",
sideOpen), ...)
})
} Below I used Screen.Recording.2022-08-27.at.14.06.35.mov |
Thank you for explaining the thinking behind this. I don't have a strong preference for the thumbs up/down icons, but if possible, if might make sense to add some error catching to prevent users from trying to add their own icon and be clear that |
I would be more in favor of option 1. Changing the rotation animation could easily break if Framework7 gets updated. |
Even when an F7Icon is chosen, it is overlaid over the f7 "plus" icon. It looks like the intent of this function is to allow a text label, but not an icon.
The text was updated successfully, but these errors were encountered: