From 923313b424fb6672d11e9acb6f05f84725d185f6 Mon Sep 17 00:00:00 2001 From: Magnus Gustafsson Date: Thu, 23 Apr 2026 11:52:14 +0200 Subject: [PATCH 1/2] Explicitly set background Co-authored-by: Copilot --- src/components/icon/demo/index.tsx | 45 +++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/src/components/icon/demo/index.tsx b/src/components/icon/demo/index.tsx index 903aba955..07b33c534 100644 --- a/src/components/icon/demo/index.tsx +++ b/src/components/icon/demo/index.tsx @@ -1,4 +1,4 @@ -import { Component, Event, EventEmitter, h, Host, State } from "@stencil/core" +import { Component, Event, EventEmitter, Fragment, h, Host, State } from "@stencil/core" import { Color, Fill, Icon, Notice } from "../../../model" @Component({ tag: "smoothly-icon-demo", @@ -11,6 +11,7 @@ export class SmoothlyIconDemo { @State() display: { filter?: string; variant?: "outline" | "sharp" } = {} @State() props: { color?: Color + customColor?: string fill?: Fill flip?: "x" | "y" size?: "tiny" | "small" | "medium" | "large" | "xlarge" @@ -32,12 +33,24 @@ export class SmoothlyIconDemo {

Props

- (this.props = e.detail)}> + { + this.props = e.detail + console.log("props", this.props) + }}> Color {Color.values.map(color => ( - - {color} + + + {color} ))} @@ -49,6 +62,26 @@ export class SmoothlyIconDemo { ))} + + Custom Color + {Color.values.flatMap(c => ( + + {["tint", "color", "shade", "contrast"].map(v => ( + + + {`rgb(var(--smoothly-${c}-${v}))`} + + ))} + + ))} + Flip x @@ -82,6 +115,10 @@ export class SmoothlyIconDemo { tooltip={name} data-name={name} color={this.props.color} + style={{ + fill: this.props["customColor"] ? `rgb(var(${this.props["customColor"]}))` : "", + color: this.props["customColor"] ? `rgb(var(${this.props["customColor"]}))` : "", + }} fill={this.props.fill} flip={this.props.flip} size={this.props.size} From 0285b788948cb9eca4dbe29d654044fe4a773f43 Mon Sep 17 00:00:00 2001 From: Magnus Gustafsson Date: Thu, 23 Apr 2026 11:56:12 +0200 Subject: [PATCH 2/2] specify customBackground in icon/demo Co-authored-by: Copilot --- src/components/icon/demo/index.tsx | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/icon/demo/index.tsx b/src/components/icon/demo/index.tsx index 07b33c534..bba05ec90 100644 --- a/src/components/icon/demo/index.tsx +++ b/src/components/icon/demo/index.tsx @@ -12,6 +12,7 @@ export class SmoothlyIconDemo { @State() props: { color?: Color customColor?: string + customBackground?: string fill?: Fill flip?: "x" | "y" size?: "tiny" | "small" | "medium" | "large" | "xlarge" @@ -23,7 +24,7 @@ export class SmoothlyIconDemo { return (

Filter and Variants

- (this.display = e.detail)}> + (this.display = e.detail)}> Filter Variant @@ -34,6 +35,7 @@ export class SmoothlyIconDemo {

Props

{ this.props = e.detail console.log("props", this.props) @@ -82,6 +84,26 @@ export class SmoothlyIconDemo { ))}
+ + Custom Background + {Color.values.flatMap(c => ( + + {["tint", "color", "shade", "contrast"].map(v => ( + + + {`rgb(var(--smoothly-${c}-${v}))`} + + ))} + + ))} + Flip x @@ -118,6 +140,7 @@ export class SmoothlyIconDemo { style={{ fill: this.props["customColor"] ? `rgb(var(${this.props["customColor"]}))` : "", color: this.props["customColor"] ? `rgb(var(${this.props["customColor"]}))` : "", + background: this.props["customBackground"] ? `rgb(var(${this.props["customBackground"]}))` : "", }} fill={this.props.fill} flip={this.props.flip}