diff --git a/inst/examples/dashboard/examples.R b/inst/examples/dashboard/examples.R index 33cf4b5c..4b40f0b5 100644 --- a/inst/examples/dashboard/examples.R +++ b/inst/examples/dashboard/examples.R @@ -92,13 +92,19 @@ readExample <- function(path) { list(code = code, ui = module$ui, server = module$server) } +makeText <- function(text) { + strsplit(text, "\\n\\n")[[1]] %>% + map(Text) %>% + Stack(tokens = list(childrenGap = 10)) +} + makeExamplePage <- function(name, example) { help <- getHelpList(name) makePage( name, "Fluent UI component", div( - makeCard("Description", Text(nowrap = FALSE, help$description)), + makeCard("Description", makeText(help$description)), makeCard("Usage", pre(help$usage)), imap(example, makeLiveExamplePage) )