mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
@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:
3
types/material-ui/index.d.ts
vendored
3
types/material-ui/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user