From 9235bbdc7b9354be821bce30195f684a6dfbd6e9 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Tue, 7 Apr 2020 23:02:11 +0100 Subject: [PATCH] [core] Fix TypeScript type for `children` This is a follow-up to #20450. See https://github.com/mui-org/material-ui/pull/20450#issuecomment-610303516 --- packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts | 2 +- packages/material-ui/src/Badge/Badge.d.ts | 2 +- packages/material-ui/src/StepContent/StepContent.d.ts | 2 +- packages/material-ui/src/StepLabel/StepLabel.d.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts b/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts index 17c3ea3469700b..b2f90e471bb5c1 100644 --- a/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts +++ b/packages/material-ui-lab/src/AvatarGroup/AvatarGroup.d.ts @@ -6,7 +6,7 @@ export interface AvatarGroupProps /** * The avatars to stack. */ - children: React.ReactNode; + children?: React.ReactNode; /** * Max avatars to show before +x. */ diff --git a/packages/material-ui/src/Badge/Badge.d.ts b/packages/material-ui/src/Badge/Badge.d.ts index 91103a3ea2336c..c4ffa0f26105e3 100644 --- a/packages/material-ui/src/Badge/Badge.d.ts +++ b/packages/material-ui/src/Badge/Badge.d.ts @@ -23,7 +23,7 @@ export interface BadgeTypeMap

{ /** * 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. diff --git a/packages/material-ui/src/StepContent/StepContent.d.ts b/packages/material-ui/src/StepContent/StepContent.d.ts index 2dad8dc2b3658a..a2ec1e47ee5967 100644 --- a/packages/material-ui/src/StepContent/StepContent.d.ts +++ b/packages/material-ui/src/StepContent/StepContent.d.ts @@ -7,7 +7,7 @@ export interface StepContentProps extends StandardProps, StepContentClasskey> { active?: boolean; alternativeLabel?: boolean; - children: React.ReactNode; + children?: React.ReactNode; completed?: boolean; last?: boolean; optional?: boolean; diff --git a/packages/material-ui/src/StepLabel/StepLabel.d.ts b/packages/material-ui/src/StepLabel/StepLabel.d.ts index 31c4f0ebce1801..fe1ff242495a0d 100644 --- a/packages/material-ui/src/StepLabel/StepLabel.d.ts +++ b/packages/material-ui/src/StepLabel/StepLabel.d.ts @@ -8,7 +8,7 @@ export interface StepLabelProps extends StandardProps, StepLabelClasskey> { active?: boolean; alternativeLabel?: boolean; - children: React.ReactNode; + children?: React.ReactNode; completed?: boolean; disabled?: boolean; error?: boolean;