[yew-devel] [PATCH yew-widget-toolkit 1/1] widget: tab panel: mark material tabs with css class for variants
Dominik Csapak
d.csapak at proxmox.com
Mon Jan 12 13:09:01 CET 2026
that way it's possible to give different css properties to primary
and secondary style material tabs.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/widget/tab/tab_bar.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/widget/tab/tab_bar.rs b/src/widget/tab/tab_bar.rs
index 44fb9f3..6714746 100644
--- a/src/widget/tab/tab_bar.rs
+++ b/src/widget/tab/tab_bar.rs
@@ -487,13 +487,13 @@ impl Component for PwtTabBar {
let rtl = self.rtl.unwrap_or(false);
let (variant_class, indicator_class) = match ctx.props().style {
- TabBarStyle::Pills => ("pwt-nav-pills", classes!()),
+ TabBarStyle::Pills => (classes!("pwt-nav-pills"), classes!()),
TabBarStyle::MaterialPrimary => (
- "pwt-tab-material",
+ classes!("pwt-tab-material", "primary"),
classes!("pwt-tab-active-indicator", "primary"),
),
TabBarStyle::MaterialSecondary => (
- "pwt-tab-material",
+ classes!("pwt-tab-material", "secondary"),
classes!("pwt-tab-active-indicator", "secondary"),
),
};
--
2.47.3
More information about the yew-devel
mailing list