@types/material-ui -ToggleProps.label change string to React.ReactNode (#25241)

* @types/material-ui - Change `ToggleProps` `label` type to `React.ReactNode` instead of `string`

* Amend samwalshnz github username to authors list for material-ui
This commit is contained in:
Sam Walsh
2018-04-25 11:13:27 +12:00
committed by Wesley Wigham
parent 6a7b69883e
commit d29b31e5db
2 changed files with 6 additions and 1 deletions

View File

@@ -11,6 +11,7 @@
// Artyom Stukans <https://github.com/artyomsv>
// Dan Jones <https://github.com/dan-j>
// Daisuke Mino <https://github.com/minodisk>
// Sam Walsh <https://github.com/samwalshnz>
// 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;

View File

@@ -5709,6 +5709,10 @@ const ToggleExampleSimple = () => (
label="Simple"
style={styles.toggle}
/>
<Toggle
label={<span>Element</span>}
style={styles.toggle}
/>
<Toggle
label="Toggled by default"
defaultToggled={true}