From 634b9a296cdec377c6eaa5aeadfcb9860ff87471 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:15:21 -0700 Subject: [PATCH 1/2] fix(sx): support Primer colors for `border*Color` properties --- src/sx.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sx.ts b/src/sx.ts index c00a71ed356..0a2f378b0c6 100644 --- a/src/sx.ts +++ b/src/sx.ts @@ -1,10 +1,12 @@ import css, {SystemCssProperties, SystemStyleObject} from '@styled-system/css' import {ThemeColorPaths, ThemeShadowPaths} from './theme' -import {ColorProps, ShadowProps} from 'styled-system' +import {ColorProps, BorderColorProps, ShadowProps} from 'styled-system' import merge from 'deepmerge' export type BetterCssProperties = { [K in keyof SystemCssProperties]: K extends keyof ColorProps + ? ThemeColorPaths | SystemCssProperties[K] + : K extends keyof BorderColorProps ? ThemeColorPaths | SystemCssProperties[K] : K extends keyof ShadowProps ? ThemeShadowPaths | SystemCssProperties[K] From 968bae72cf1f19170fc12f0e7aeb359850aeab04 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Thu, 10 Aug 2023 15:16:49 -0700 Subject: [PATCH 2/2] build: add changeset --- .changeset/angry-boats-wash.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/angry-boats-wash.md diff --git a/.changeset/angry-boats-wash.md b/.changeset/angry-boats-wash.md new file mode 100644 index 00000000000..7b7e1d30c6f --- /dev/null +++ b/.changeset/angry-boats-wash.md @@ -0,0 +1,7 @@ +--- +'@primer/react': patch +--- + +Include `border*Color` properties in sx to support named Primer colors + +