pub fn collapse_link(target_id: &str, text: &str) -> Element<A>Expand description
Create a collapse trigger link.
Examples found in repository?
examples/bootstrap_docs.rs (line 721)
704fn collapse_section() -> Element<Section> {
705 Element::<Section>::new()
706 .attr("id", "collapse")
707 .class("mb-5")
708 .child::<H2, _>(|h| h.class("border-bottom pb-2").text("Collapse"))
709 .child::<P, _>(|p| {
710 p.class("lead")
711 .text("Toggle the visibility of content with a few classes and JavaScript plugins.")
712 })
713 .child::<H4, _>(|h| h.class("mt-4").text("Example"))
714 .child::<Div, _>(|d| {
715 d.class("bd-example mb-3")
716 .child::<P, _>(|p| {
717 p.child::<Button, _>(|_| {
718 collapse::collapse_button("collapseExample", "Toggle content")
719 })
720 .text(" ")
721 .child::<A, _>(|_| collapse::collapse_link("collapseExample", "Link"))
722 })
723 .child::<Div, _>(|_| {
724 collapse::collapse_content("collapseExample", |div| {
725 div.child::<Div, _>(|d| {
726 d.class("card card-body")
727 .text("Some placeholder content for the collapse component.")
728 })
729 })
730 })
731 })
732}