4 examples of 'material ui media query' in JavaScript

Every line of 'material ui media query' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
86@Input() set mediaQuery(m: Array<{screenWidth: number, blockCount: number}>) {
87 this._mediaSorted = m.sort((a, b) => a.screenWidth - b.screenWidth)
88}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

18get media() {
19 return this._query
20}
69public get mediaQuery(): ComponentMediaQuery {
70 if (this.offsetWidth < 768) {
71 return ComponentMediaQuery.mobile;
72 } else if (this.offsetWidth < 1200) {
73 return ComponentMediaQuery.tablet;
74 } else {
75 return ComponentMediaQuery.desktop;
76 }
77}
30var MediaQueryWrapper = function MediaQueryWrapper() {
31 var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
32 var dispatch = props.dispatch,
33 fakeWidth = props.fakeWidth,
34 children = props.children,
35 other = (0, _objectWithoutProperties2["default"])(props, ["dispatch", "fakeWidth", "children"]);
36 var values = {
37 deviceWidth: fakeWidth,
38 width: fakeWidth
39 };
40 return _react["default"].createElement(_reactResponsive["default"], (0, _extends2["default"])({}, other, {
41 values: values
42 }), children);
43};

Related snippets