Skip to content

[docs-infra] Support interfaces for X docs#41069

Merged
alexfauquette merged 5 commits intomui:masterfrom
alexfauquette:improve-props-table
Feb 22, 2024
Merged

[docs-infra] Support interfaces for X docs#41069
alexfauquette merged 5 commits intomui:masterfrom
alexfauquette:improve-props-table

Conversation

@alexfauquette
Copy link
Copy Markdown
Member

@alexfauquette alexfauquette commented Feb 12, 2024

Add some customization of the props element to support the interface display in mui/mui-x#12016

The result can be seen here: https://deploy-preview-12016--material-ui-x.netlify.app/x/api/data-grid/grid-api/

@mui-bot
Copy link
Copy Markdown

mui-bot commented Feb 12, 2024

Netlify deploy preview

https://deploy-preview-41069--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 764ed1a

@alexfauquette alexfauquette added scope: data grid Changes related to the data grid. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). labels Feb 12, 2024
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Feb 16, 2024
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Feb 20, 2024
@alexfauquette alexfauquette marked this pull request as ready for review February 20, 2024 11:05
@zannager zannager requested a review from siriwatknp February 20, 2024 12:16
note?: string;
sx?: SxProps;
title: string;
title: string | React.ReactNode;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows to add a link to the pricing page when it's a pro or premium feature

export default function PropertiesTable(props: PropertiesTableProps) {
const { properties } = props;

const hasDefaultColumn = properties.some((item) => item.propDefault !== undefined);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some interfaces don't have default values for all their attributes. In such case we simply don't show the column

@alexfauquette alexfauquette merged commit bd143f4 into mui:master Feb 22, 2024
@alexfauquette alexfauquette deleted the improve-props-table branch February 22, 2024 09:27
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: data grid Changes related to the data grid. scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants