File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ component <- function(name, varArgs = list()) {
2525 if (length(name ) == 0 || ! isUpper(substring(name , 1 , 1 ))) {
2626 stop(" Component name must be specified and start with an upper case character" )
2727 }
28- htmltools :: tag(name , varArgs )
28+ component <- htmltools :: tag(name , varArgs )
29+ structure(component , class = c(" reactR_component" , oldClass(component )))
2930}
3031
3132# ' React component builder.
@@ -76,15 +77,16 @@ React <- structure(
7677# ' Prepare data that represents a single-element character vector, a React
7778# ' component, or an htmltools tag for sending to the client.
7879# '
80+ # ' Tag lists as returned by \code{\link[htmltools]{tagList}} are not currently
81+ # ' supported.
82+ # '
7983# ' @param tag character vector or React component or
8084# ' \code{\link[htmltools]{tag}}
8185# '
8286# ' @return
8387# ' @export
84- # '
85- # ' @examples
8688reactMarkup <- function (tag ) {
87- stopifnot(class (tag ) == " shiny.tag"
89+ stopifnot(inherits (tag , " shiny.tag" )
8890 || (is.character(tag ) && length(tag ) == 1 ))
8991 list (tag = tag , class = " reactR.markup" )
9092}
You can’t perform that action at this time.
0 commit comments