kcuilla / reactablefmtr

Streamlined Table Styling and Formatting for Reactable
https://kcuilla.github.io/reactablefmtr/
Other
208 stars 27 forks source link

`icon_sets()` not recognizing certain icons #52

Open asadow opened 1 year ago

asadow commented 1 year ago

The guide did not specify that some icons are unavailable and why. I get repeatable errors for icons like "island-tropical", "face-thermometer", "face-mask".

library(tidyverse)
library(reactable)
library(reactablefmtr)

car_data <- MASS::Cars93 %>%
  filter(Type %in% c("Compact", "Sporty", "Van")) %>%
  select(c("Make", "Type", "MPG.city", "MPG.highway")) %>%
  head(10)

reactable(
  car_data,
  defaultColDef = colDef(
    align = "center",
    cell = icon_sets(car_data, icon_size = 28, icons = "face-mask", colors = c("red", "grey", "darkgreen"))
  )
)
#> The `name` provided ('face-mask') does not correspond to a known icon
#> The `name` provided ('face-mask') does not correspond to a known icon
#> The `name` provided ('face-mask') does not correspond to a known icon
#> [repeats above message for number of rows in data]
rprops commented 1 year ago

The same problem occurs with icon_assign where many free font-awesome icons are not rendered or found.

jmodlis commented 3 months ago

The fonts listed above ("island-tropical", "face-thermometer", and "face-mask") are pro - this is probably why you are having problems.

asadow commented 3 months ago

Hmm, I wonder if we can integrate a list of pro icons for a more helpful error message.