Added missing inputStyle prop to <Checkbox /> (#18438)

This commit is contained in:
Dan 2017-07-28 01:02:31 +10:00 committed by Andy
parent 443bfb3548
commit 03c50b2890
2 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@
// Matthias Schlesinger <https://github.com/schlesingermatthias>
// Jonathon Kelly <https://github.com/InsidersByte>
// Artyom Stukans <https://github.com/artyomsv>
// Dan Jones <https://github.com/dan-j>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@ -1472,6 +1473,7 @@ declare namespace __MaterialUI {
style?: React.CSSProperties;
uncheckedIcon?: React.ReactElement<{ style?: React.CSSProperties }>; // Normally an SvgIcon
valueLink?: ReactLink<boolean>;
inputStyle?: React.CSSProperties;
}
export class Checkbox extends React.Component<CheckboxProps> {
/** @deprecated Use checked property instead */

View File

@ -231,6 +231,9 @@ const styles: { [key: string]: React.CSSProperties } = {
floatingLabelFocusStyle: {
color: blue500,
},
inputStyle: {
width: '100%',
}
};
const style = {
@ -3618,6 +3621,12 @@ const CheckboxExampleSimple = () => (
labelPosition="left"
style={styles.checkbox}
/>
<Checkbox
label="Overriding inputStyles on the left"
labelPosition="left"
style={styles.checkbox}
inputStyle={styles.inputStyle}
/>
</div>
);