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

[misc] Batch small changes #18614

Merged
merged 5 commits into from
Nov 29, 2019
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
4 changes: 3 additions & 1 deletion docs/src/pages/components/text-fields/text-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ It supports standard, outlined and filled styling.

{{"demo": "pages/components/text-fields/BasicTextFields.js"}}

Note: The standard variant of the `TextField` is no longer documented in the [Material Design guidelines](https://material.io/), but Material-UI will continue to support it.
**Note:** The standard variant of the `TextField` is no longer documented in the [Material Design guidelines](https://material.io/)
([here's why](https://medium.com/google-design/the-evolution-of-material-designs-text-fields-603688b3fe03)),
but Material-UI will continue to support it.

## Form props

Expand Down
2 changes: 2 additions & 0 deletions docs/src/pages/styles/basics/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Material-UI's styling solution is inspired by many other styling libraries such

## Installation

> `@material-ui/styles` is re-exported as `@material-ui/core/styles` - you only need to install it if you wish to use it independently from Material-UI.

To install and save in your `package.json` dependencies, run:

```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import capitalize from '../utils/capitalize';
const SIZE = 44;

function getRelativeValue(value, min, max) {
const clampedValue = Math.min(Math.max(min, value), max);
return (clampedValue - min) / (max - min);
return (Math.min(Math.max(min, value), max) - min) / (max - min);
}

function easeOut(t) {
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/NativeSelect/NativeSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ NativeSelectInput.propTypes = {
/**
* The icon that displays the arrow.
*/
IconComponent: PropTypes.elementType,
IconComponent: PropTypes.elementType.isRequired,
/**
* Use that prop to pass a ref to the native select element.
* @deprecated
Expand Down
8 changes: 1 addition & 7 deletions packages/material-ui/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ function asc(a, b) {
}

function clamp(value, min, max) {
if (value < min) {
return min;
}
if (value > max) {
return max;
}
return value;
return Math.min(Math.max(min, value), max);
}

function findClosest(values, currentValue) {
Expand Down
8 changes: 1 addition & 7 deletions packages/material-ui/src/styles/colorManipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ function clamp(value, min = 0, max = 1) {
}
}

if (value < min) {
return min;
}
if (value > max) {
return max;
}
return value;
return Math.min(Math.max(min, value), max);
}

/**
Expand Down