-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Hello everybody,
I played around with the reactsTrap example and created a custom Flipcard with received props.
function ActionButton({ configuration }) {
return (
<div>
<div className="flip-card">
<div className="flip-card-inner">
<div className="flip-card-front">
<img
src={
"https://www.tageblatt.lu/wp-content/uploads/2019/12/17735_cx__cy__cw__ch_-740x493.jpg"
}
style={{ width: 300, height: 500 }}
/>
</div>
<div className="flip-card-back">{configuration.label}</div>
</div>
</div>
</div>
);
}
The R file looks like this:
action_button <- function(
inputId,
label
) {
reactR::createReactShinyInput(
inputId,
"action_button",
htmltools::htmlDependency(
name = "action_button-input",
version = "1.0.0",
src = "www/reactstrapTest",
package = "reactstrapTest",
script = "main.js"
),
default = 0,
configuration = list(
label = label
),
htmltools::tags$div
)
}
The example works pretty fine and I am able to pass a label as plain text. What I desire to do is to pass more complex html Elements as props, for example a Plot from HighcharteR.
Passing everything else than plain text results in an Error:
action_button("bla", label = tags$p("test"))
Error: No method asJSON S3 class: shiny.tag
Is it possible to pass more complex objects there?
Metadata
Metadata
Assignees
Labels
No labels