From 1f70741dcf51f07a9512a18256f3baacdf293e19 Mon Sep 17 00:00:00 2001 From: Philip Wedemann <22521688+hfhbd@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:32:27 +0200 Subject: [PATCH] Html: SVG - Add fillOpacity attribute (#3725) * Html: SVG - Add fillOpacity attribute * Add typed overloads * Use normal number * Update svgAttrs.kt * Remove public marker --- .../kotlin/org/jetbrains/compose/web/svg/svgAttrs.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/html/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svgAttrs.kt b/html/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svgAttrs.kt index 4d0d74ac57..d92d0e0f3e 100644 --- a/html/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svgAttrs.kt +++ b/html/svg/src/jsMain/kotlin/org/jetbrains/compose/web/svg/svgAttrs.kt @@ -41,6 +41,14 @@ fun AttrsScope.fillRule(fill: String) { attr("fill-rule", fill) } +fun AttrsScope.fillOpacity(fill: Number) { + attr("fill-opacity", fill.toString()) +} + +fun AttrsScope.fillOpacity(fill: CSSPercentageValue) { + attr("fill-opacity", fill.toString()) +} + fun AttrsScope.href(href: String) { attr("href", href) }