Skip to content
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

[FormControlLabel] Correct the style description #12304

Merged
merged 1 commit into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/material-ui/src/FormControlLabel/FormControlLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const styles = theme => ({
cursor: 'default',
},
},
/* Styles applied to the root element if `position="start"`. */
start: {
/* Styles applied to the root element if `labelPlacement="start"`. */
labelPlacementStart: {
flexDirection: 'row-reverse',
},
/* Styles applied to the root element if `disabled={true}`. */
Expand Down Expand Up @@ -79,7 +79,7 @@ function FormControlLabel(props, context) {
className={classNames(
classes.root,
{
[classes.start]: labelPlacement === 'start',
[classes.labelPlacementStart]: labelPlacement === 'start',
[classes.disabled]: disabled,
},
classNameProp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('<FormControlLabel />', () => {
const wrapper = shallow(
<FormControlLabel label="Pizza" labelPlacement="start" control={<div />} />,
);
assert.strictEqual(wrapper.hasClass(classes.start), true);
assert.strictEqual(wrapper.hasClass(classes.labelPlacementStart), true);
});
});

Expand Down
2 changes: 1 addition & 1 deletion pages/api/form-control-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This property accepts the following keys:
| Name | Description |
|:-----|:------------|
| <span class="prop-name">root</span> | Styles applied to the root element.
| <span class="prop-name">start</span> | Styles applied to the root element if `position="start"`.
| <span class="prop-name">labelPlacementStart</span> | Styles applied to the root element if `labelPlacement="start"`.
| <span class="prop-name">disabled</span> | Styles applied to the root element if `disabled={true}`.
| <span class="prop-name">label</span> | Styles applied to the label's Typography component.

Expand Down