Closed JosiahParry closed 7 months ago
tag(
"calcite-notice",
id = "initial-note",
open = NA,
icon = "information"
)
I've looked at this before and it's in our docs in a reasonable place but is still hard to find.
Oh nice! Thank you! The below works
htmltools::tag(
"calcite-notice",
list(
id = "initial-note",
open = NA,
icon = "information"
)
)
One more thing that might be useful to know: in HTML, an attribute with no value is semantically equivalent to one with the value ""
, like the two below:
<div open>
<div open="">
https://html-validate.org/rules/attribute-empty-style.html https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
@wch i did not know that! Thank you
<calcite-notice id="initial-note" open icon="information">
I am trying to wrap some custom components using the
tag()
function. However, I'm running into a situation where I need to be able to pass in a value to the tag without it being a key in a keyvalue pair. Is there any way to accomplish this with the existing infrastructure?