Customise the style of an icon
icon_style(x, scale = NULL, fill = NULL, rotate = NULL, ...)The input x (an icons vector), with its style updated to
reflect the requested styling.
path <- tempfile(fileext = ".svg")
writeLines(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0"/></svg>',
path
)
icon <- read_icon(path)
icon_style(icon, scale = 2, fill = "red", rotate = 90)
#> <icons[1]>
#> [1] <icon:file19a6487edcf>