From f03ae58b1546289096a725c357c735cb4c41bc91 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Wed, 18 Dec 2024 12:55:38 -0800 Subject: [PATCH] Deprecate use of sx prop by deprecating the SxProp type definition (#5443) * Use DeprecatedSxProp instead of SxProp * Create few-coins-kick.md * Fix typo in changeset description * Use SxProp and deprecate that instead * Fix typo in changeset description * Fix typo in changeset description --- .changeset/few-coins-kick.md | 5 +++++ packages/react/src/sx.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/few-coins-kick.md diff --git a/.changeset/few-coins-kick.md b/.changeset/few-coins-kick.md new file mode 100644 index 00000000000..4479640c18c --- /dev/null +++ b/.changeset/few-coins-kick.md @@ -0,0 +1,5 @@ +--- +"@primer/react": minor +--- + +Deprecate use of sx prop by deprecating the `SxProp` type definition diff --git a/packages/react/src/sx.ts b/packages/react/src/sx.ts index 5b9a20fc011..0d11b6cc647 100644 --- a/packages/react/src/sx.ts +++ b/packages/react/src/sx.ts @@ -26,6 +26,7 @@ type CSSSelectorObject = { export type BetterSystemStyleObject = BetterCssProperties | SystemStyleObject | CSSCustomProperties | CSSSelectorObject export interface SxProp { + /** @deprecated Use CSS modules for styling instead */ sx?: BetterSystemStyleObject }