-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[InputLabel] Remove FormLabelClasses in favor of asterisk class #14504
Changes from all commits
07e9756
be3935c
a01d34e
40adf5e
e3aff04
994df13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ export const styles = theme => ({ | |
error: {}, | ||
/* Styles applied to the root element if `required={true}`. */ | ||
required: {}, | ||
/* Styles applied to the asterisk element. */ | ||
asterisk: {}, | ||
/* Styles applied to the root element if the component is a descendant of `FormControl`. */ | ||
formControl: { | ||
position: 'absolute', | ||
|
@@ -86,7 +88,6 @@ function InputLabel(props) { | |
classes, | ||
className, | ||
disableAnimation, | ||
FormLabelClasses, | ||
margin, | ||
muiFormControl, | ||
shrink: shrinkProp, | ||
|
@@ -125,7 +126,7 @@ function InputLabel(props) { | |
disabled: classes.disabled, | ||
error: classes.error, | ||
required: classes.required, | ||
...FormLabelClasses, | ||
asterisk: classes.asterisk, | ||
}} | ||
{...other} | ||
> | ||
|
@@ -141,7 +142,7 @@ InputLabel.propTypes = { | |
children: PropTypes.node, | ||
/** | ||
* Override or extend the styles applied to the component. | ||
* See [CSS API](#css-api) below for more details. | ||
* See [CSS API](#css) below for more details. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice finding! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should fix all the other links (+100) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oliviertassinari thanks for reviewing. Should I make separate PR for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it would be awesome! |
||
*/ | ||
classes: PropTypes.object.isRequired, | ||
/** | ||
|
@@ -164,10 +165,6 @@ InputLabel.propTypes = { | |
* If `true`, the input of this label is focused. | ||
*/ | ||
focused: PropTypes.bool, | ||
/** | ||
* `classes` property applied to the [`FormLabel`](/api/form-label/) element. | ||
*/ | ||
FormLabelClasses: PropTypes.object, | ||
/** | ||
* If `dense`, will adjust vertical spacing. This is normally obtained via context from | ||
* FormControl. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1048,7 +1048,7 @@ const PopoverTest = () => <Popover open ModalClasses={{ root: 'foo', hidden: 'ba | |
|
||
const InputLabelTest = () => ( | ||
<InputLabel | ||
FormLabelClasses={{ | ||
classes={{ | ||
root: 'foo', | ||
asterisk: 'foo', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pelotom This was accepted before I added the I suspect this is a typescript bug? |
||
disabled: 'foo', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change now.