mui / material-ui

Material UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
91.73k stars 31.51k forks source link

[docs-infra] Show plan on API pages #41991

Open oliviertassinari opened 2 weeks ago

oliviertassinari commented 2 weeks ago

Current behavior

https://mui.com/x/api/date-pickers/mobile-date-range-picker/ doesn't show the plan in the h1

SCR-20240421-qgbk

while we do for demos:

SCR-20240421-qgeu

https://mui.com/x/react-date-pickers/date-time-range-field/

Expected behavior

Show the plan

Context

It looks like we could implement this like similar to how we are implementing the getComponentImports() function:

https://github.com/mui/material-ui/blob/c435f65536a0b84ee86140790761daa97f7ec8cf/packages/api-docs-builder/ApiBuilders/ComponentApiBuilder.ts#L750

Meaning, having each package define what is Pro, Premium, MIT based on the filename location.

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: -