(
rs_highlighted: HighlightedCode,
css_highlighted: HighlightedCode,
#[props(default = ComponentType::Normal)] component_type: ComponentType,
)
| 561 | |
| 562 | #[component] |
| 563 | fn ComponentCode( |
| 564 | rs_highlighted: HighlightedCode, |
| 565 | css_highlighted: HighlightedCode, |
| 566 | #[props(default = ComponentType::Normal)] component_type: ComponentType, |
| 567 | ) -> Element { |
| 568 | rsx! { |
| 569 | Tabs { |
| 570 | default_value: "main.rs", |
| 571 | border_bottom_left_radius: "0.5rem", |
| 572 | border_bottom_right_radius: "0.5rem", |
| 573 | horizontal: true, |
| 574 | width: "100%", |
| 575 | TabList { |
| 576 | TabTrigger { value: "main.rs", index: 0usize, "main.rs" } |
| 577 | TabTrigger { value: "style.css", index: 1usize, "style.css" } |
| 578 | if component_type != ComponentType::Block { |
| 579 | TabTrigger { value: "dx-components-theme.css", index: 2usize, "dx-components-theme.css" } |
| 580 | } |
| 581 | } |
| 582 | div { |
| 583 | width: "100%", |
| 584 | height: "100%", |
| 585 | display: "flex", |
| 586 | flex_direction: "column", |
| 587 | justify_content: "center", |
| 588 | align_items: "center", |
| 589 | TabContent { |
| 590 | index: 0usize, |
| 591 | padding: 0, |
| 592 | value: "main.rs", |
| 593 | width: "100%", |
| 594 | position: "relative", |
| 595 | CodeBlock { source: rs_highlighted } |
| 596 | } |
| 597 | TabContent { |
| 598 | index: 1usize, |
| 599 | padding: 0, |
| 600 | value: "style.css", |
| 601 | width: "100%", |
| 602 | position: "relative", |
| 603 | CodeBlock { source: css_highlighted } |
| 604 | } |
| 605 | if component_type != ComponentType::Block { |
| 606 | TabContent { |
| 607 | index: 2usize, |
| 608 | padding: 0, |
| 609 | value: "dx-components-theme.css", |
| 610 | width: "100%", |
| 611 | position: "relative", |
| 612 | CodeBlock { source: THEME_CSS } |
| 613 | } |
| 614 | } |
| 615 | } |
| 616 | } |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | #[component] |
nothing calls this directly
no outgoing calls
no test coverage detected