diff --git a/types/material-ui/index.d.ts b/types/material-ui/index.d.ts index 8c7a49c96d..307ce84115 100644 --- a/types/material-ui/index.d.ts +++ b/types/material-ui/index.d.ts @@ -11,6 +11,7 @@ // Artyom Stukans // Dan Jones // Daisuke Mino +// Sam Walsh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 @@ -1583,7 +1584,7 @@ declare namespace __MaterialUI { elementStyle?: React.CSSProperties; iconStyle?: React.CSSProperties; inputStyle?: React.CSSProperties; - label?: string; + label?: React.ReactNode; labelPosition?: "left" | "right"; labelStyle?: React.CSSProperties; onToggle?(e: React.MouseEvent<{}>, isInputChecked: boolean): void; diff --git a/types/material-ui/material-ui-tests.tsx b/types/material-ui/material-ui-tests.tsx index a416670d0d..a7bb59fcf8 100644 --- a/types/material-ui/material-ui-tests.tsx +++ b/types/material-ui/material-ui-tests.tsx @@ -5709,6 +5709,10 @@ const ToggleExampleSimple = () => ( label="Simple" style={styles.toggle} /> + Element} + style={styles.toggle} + />