Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109784329
createSpacing.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Apr 23, 09:18
Size
1 KB
Mime Type
text/x-java
Expires
Fri, Apr 25, 09:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25738412
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
createSpacing.js
View Options
import { createUnarySpacing } from '../spacing';
/* tslint:enable:unified-signatures */
export default function createSpacing() {
var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
// Already transformed.
if (spacingInput.mui) {
return spacingInput;
}
// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.
// Smaller components, such as icons, can align to a 4dp grid.
// https://m2.material.io/design/layout/understanding-layout.html
var transform = createUnarySpacing({
spacing: spacingInput
});
var spacing = function spacing() {
for (var _len = arguments.length, argsInput = new Array(_len), _key = 0; _key < _len; _key++) {
argsInput[_key] = arguments[_key];
}
if (process.env.NODE_ENV !== 'production') {
if (!(argsInput.length <= 4)) {
console.error("MUI: Too many arguments provided, expected between 0 and 4, got ".concat(argsInput.length));
}
}
var args = argsInput.length === 0 ? [1] : argsInput;
return args.map(function (argument) {
var output = transform(argument);
return typeof output === 'number' ? "".concat(output, "px") : output;
}).join(' ');
};
spacing.mui = true;
return spacing;
}
Event Timeline
Log In to Comment