diff --git a/.changeset/tiny-ravens-sing.md b/.changeset/tiny-ravens-sing.md new file mode 100644 index 00000000000..d5c2c312a19 --- /dev/null +++ b/.changeset/tiny-ravens-sing.md @@ -0,0 +1,6 @@ +--- +'@shopify/polaris-migrator': patch +'polaris.shopify.com': patch +--- + +Fixed mapping for `TextStyle` `variation="strong"` to use `Text` `fontWeight="semibold"` instead of `fontWeight="bold"` diff --git a/polaris-migrator/src/migrations/react-replace-text-components/steps/replace-text-style.ts b/polaris-migrator/src/migrations/react-replace-text-components/steps/replace-text-style.ts index 2e4e4ff33ea..11f45ec1e23 100644 --- a/polaris-migrator/src/migrations/react-replace-text-components/steps/replace-text-style.ts +++ b/polaris-migrator/src/migrations/react-replace-text-components/steps/replace-text-style.ts @@ -22,7 +22,7 @@ import type {MigrationOptions} from '../react-replace-text-components'; import {POLARIS_MIGRATOR_COMMENT} from '../../../constants'; const variationMap = { - strong: {fontWeight: 'bold'}, + strong: {fontWeight: 'semibold'}, subdued: {color: 'subdued'}, positive: {color: 'success'}, negative: {color: 'critical'}, diff --git a/polaris-migrator/src/migrations/react-replace-text-components/tests/react-replace-text-components.output.tsx b/polaris-migrator/src/migrations/react-replace-text-components/tests/react-replace-text-components.output.tsx index 31df9d31999..da0bc6e6b15 100644 --- a/polaris-migrator/src/migrations/react-replace-text-components/tests/react-replace-text-components.output.tsx +++ b/polaris-migrator/src/migrations/react-replace-text-components/tests/react-replace-text-components.output.tsx @@ -44,7 +44,7 @@ export function App() { Caption - + Strong diff --git a/polaris-migrator/src/migrations/react-replace-text-components/tests/with-relative.output.tsx b/polaris-migrator/src/migrations/react-replace-text-components/tests/with-relative.output.tsx index 29018d47961..9349f673510 100644 --- a/polaris-migrator/src/migrations/react-replace-text-components/tests/with-relative.output.tsx +++ b/polaris-migrator/src/migrations/react-replace-text-components/tests/with-relative.output.tsx @@ -34,7 +34,7 @@ export function App() { Caption - + Strong diff --git a/polaris.shopify.com/content/components/text-style.md b/polaris.shopify.com/content/components/text-style.md index 1f17f83c8c4..16f48f2157c 100644 --- a/polaris.shopify.com/content/components/text-style.md +++ b/polaris.shopify.com/content/components/text-style.md @@ -37,7 +37,7 @@ status: ```diff - No supplier listed -+ No supplier listed ++ No supplier listed ``` ### Positive