Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix TypeScript type for optional children #20458

Merged
merged 2 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface AvatarGroupProps
/**
* The avatars to stack.
*/
children: React.ReactNode;
children?: React.ReactNode;
/**
* Max avatars to show before +x.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Badge/Badge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface BadgeTypeMap<P = {}, D extends React.ElementType = 'div'> {
/**
* The badge will be added relative to this node.
*/
children: React.ReactNode;
children?: React.ReactNode;
/**
* The color of the component.
* It supports those theme colors that make sense for this component.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/StepContent/StepContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface StepContentProps
/**
* Step content.
*/
children: React.ReactNode;
children?: React.ReactNode;
/**
* The component used for the transition.
* [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/StepLabel/StepLabel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface StepLabelProps
/**
* In most cases will simply be a string containing a title for the label.
*/
children: React.ReactNode;
children?: React.ReactNode;
/**
* Mark the step as disabled, will also disable the button if
* `StepLabelButton` is a child of `StepLabel`. Is passed to child components.
Expand Down