paradiego
This commit is contained in:
10
node_modules/@mui/material/modern/styles/getOverlayAlpha.js
generated
vendored
Normal file
10
node_modules/@mui/material/modern/styles/getOverlayAlpha.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
|
||||
export default function getOverlayAlpha(elevation) {
|
||||
let alphaValue;
|
||||
if (elevation < 1) {
|
||||
alphaValue = 5.11916 * elevation ** 2;
|
||||
} else {
|
||||
alphaValue = 4.5 * Math.log(elevation + 1) + 2;
|
||||
}
|
||||
return Math.round(alphaValue * 10) / 1000;
|
||||
}
|
||||
Reference in New Issue
Block a user