In the following example I have the regular version of the fontawesome star
icon:
library(dplyr)
library(reactable)
library(reactablefmtr)
tibble(
stars = 1:5
) %>%
reactable(
columns = list(
stars = colDef(
show = TRUE,
name = "Stars",
align = "center",
cell = icon_assign(., icon = "star", fill_color = "gold", buckets = 5, show_values = "none")
)
)
)
I am looking for a way to use the solid star version. Any help appreciated.
icon_assign
relies onshiny::icon
which would theoretically allow for using differentfa
classes:produces the following two stars (BTW you said you want the solid form instead of the regular form, but if I try your code I already got the solid form [i.e. the filled star], so I assume you really want the regular form [i.e. the unfilled]),
However, looking into the code of
icon_assign
you see thatshiny::icon
is called without any further arguments.Thus, you have basically 2 options:
icon_assign
and allow for an additionalclass
parameter to be passed toshiny::icon
.icon_assign
altogether)