Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ResourceList] Add headerContent prop for customizing header on Resou…
…rceList (#8083) ### WHY are these changes introduced? Related issue https://github.com/Shopify/ecosystem-merchant-engagement/issues/1106 Currently there is no way to show a customized header on the resource list and the only options available are 'Showing x items' or 'Showing x of y items'. As part of the updated app settings project on admin, we wanted to show some other content and got in touch with the polaris team and learnt we could contribute since this doesn't exist at the moment. ### WHAT is this pull request doing? This PR adds an optional headerContent prop of type string which lets the user pass in any heading they want to display on the resource list header. <img width="750" alt="Screenshot 2023-01-18 at 2 23 19 PM" src="https://user-images.githubusercontent.com/59700774/213275258-eb1d8fac-742a-4835-9d45-6ff38701839c.png"> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) <!-- Give as much information as needed to experiment with the component in the playground. --> <details> <summary>Copy-paste this code in <code>playground/Playground.tsx</code>:</summary> ```jsx import React from 'react'; import {Page} from '../src'; export function Playground() { return ( <Page title="Playground"> {/* Add the code you want to test in here */} </Page> ); } ``` </details> ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide Co-authored-by: Krithika Janakiraman <krithikajanakiraman@Krithikas-MacBook-Pro-2.local>
- Loading branch information