[yew-devel] [PATCH yew-widget-toolkit v2 02/12] widget: button: don't hardcode icons font size

Dominik Csapak d.csapak at proxmox.com
Mon Jun 30 10:24:59 CEST 2025


the button already sets a font size, and if that gets overwritten,
hardcoding the icon size here does not get overwritten. By removing this
here, we allow setting both the text and icon size from outside

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/widget/button.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/widget/button.rs b/src/widget/button.rs
index 1dc924d..b324ca7 100644
--- a/src/widget/button.rs
+++ b/src/widget/button.rs
@@ -214,7 +214,7 @@ impl Component for PwtButton {
             if !icon_class.is_empty() {
                 // Chromium fires onclick from nested elements, so we need to suppress that manually here
                 children.push(html!{
-                    <span class="pwt-font-label-large" onclick={suppress_onclick.clone()}><i role="none" class={icon_class.clone()}></i></span>
+                    <span onclick={suppress_onclick.clone()}><i role="none" class={icon_class.clone()}></i></span>
                 });
             }
         }
-- 
2.39.5





More information about the yew-devel mailing list