From 48cfe079787d6f8465943c51a3e01f638d0e3ac6 Mon Sep 17 00:00:00 2001 From: Lo Kim Date: Thu, 21 Sep 2023 10:47:03 -0400 Subject: [PATCH 1/2] [polaris.shopify.com] Fix preview for color tokens --- polaris.shopify.com/src/components/TokenList/TokenList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polaris.shopify.com/src/components/TokenList/TokenList.tsx b/polaris.shopify.com/src/components/TokenList/TokenList.tsx index 65878bb082f..fdf435dbf71 100644 --- a/polaris.shopify.com/src/components/TokenList/TokenList.tsx +++ b/polaris.shopify.com/src/components/TokenList/TokenList.tsx @@ -232,7 +232,7 @@ function TokenPreview({name, value}: TokenPreviewProps) { }; // Colors - if (value.startsWith('rgba')) { + if (value.startsWith('rgba') || value.includes('color-')) { return (
Date: Thu, 21 Sep 2023 10:47:52 -0400 Subject: [PATCH 2/2] Add changeset --- .changeset/silly-years-search.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/silly-years-search.md diff --git a/.changeset/silly-years-search.md b/.changeset/silly-years-search.md new file mode 100644 index 00000000000..013a6e4abe2 --- /dev/null +++ b/.changeset/silly-years-search.md @@ -0,0 +1,5 @@ +--- +'polaris.shopify.com': patch +--- + +Updated logic for rendering `color` custom property previews in `TokenList`