Skip to content

Commit

Permalink
[misc] Batch small changes (#18614)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes authored and oliviertassinari committed Nov 29, 2019
1 parent ab490b8 commit 5147ac2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
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

0 comments on commit 5147ac2

Please sign in to comment.