I’m trying to create a Bootstrap 4 navbar in my React.Basic application.
Unfortunately, this requires use of some attributes which are unsupported by React.Basic, e.g. data-toggle
, etc., as shown in this extract from https://getbootstrap.com/docs/4.1/components/navbar/
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
My naive attempt doesn’t work, and simply omitting these attributes fails to give satisfactory menu behaviour. Here’s the extract from my PureScript component:
, R.button
{ className: "navbar-toggler"
, type: "button"
--, dataToggle: "collapse"
--, dataTarget: "#navbarSupportedContent"
--, ariaControls: "navbarSupportedContent"
--, ariaExpanded: "false"
--, ariaLabel: "Toggle navigation"
, children: [ R.span { className: "navbar-toggler-icon" } ]
}
Is there some escape hatch in React.Basic for creating such components?