Skip to content

Commit

Permalink
feat: break blocks of descriptions into paragraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Sobolewski committed Jun 29, 2023
1 parent 15ea0de commit dde35f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion inst/examples/dashboard/examples.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down

0 comments on commit dde35f5

Please sign in to comment.