Skip to content

Commit 3b32f34

Browse files
Add v11 breadcrumb migration docs (#8466)
### WHY are these changes introduced? After we add the new migrator we should publish these docs. Related: #8071 #8465 --------- Co-authored-by: Sam Rose <sam.rose@shopify.com>
1 parent 7f0f2ca commit 3b32f34

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.changeset/tasty-carrots-sip.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris.shopify.com': minor
3+
---
4+
5+
Adds documentation for the Page breadcrumbs migration

polaris.shopify.com/content/tools/polaris-migrator.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ npx @shopify/polaris-migrator <migration> <path>
2525

2626
## Migrations
2727

28+
### v11
29+
30+
#### `v11-react-breadcrumbs-migrate-from-array`
31+
32+
Replace legacy Page component `breadcrumbs` props with the new `backAction` prop which accepts a [`LinkAction` object](https://github.com/Shopify/polaris/blob/main/polaris-react/src/types.ts#L113-L122).
33+
34+
```diff
35+
- <Page breadcrumbs={[{url: '/testing', content: 'Home'}]}>
36+
+ <Page backAction={{url: '/testing', content: 'Home'}}>
37+
```
38+
39+
```sh
40+
npx @shopify/polaris-migrator v11-react-breadcrumbs-migrate-from-array <path>
41+
```
42+
2843
### v10
2944

3045
#### `v10-react-replace-text-components`

0 commit comments

Comments
 (0)