diff --git a/package.json b/package.json index 826c6cb17..59b0e3a14 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "react-intl-redux": "0.6.0", "react-modal": "2.2.2", "react-redux": "5.0.6", + "react-responsive": "1.3.4", "react-style-proptype": "3.0.0", "react-tabs": "1.1.0", "react-test-renderer": "^15.5.4", diff --git a/src/components/forms/input.css b/src/components/forms/input.css index 6747e2c21..91b42d4cc 100644 --- a/src/components/forms/input.css +++ b/src/components/forms/input.css @@ -35,6 +35,6 @@ } .input-small { - width: 3.5rem; + width: 3rem; text-align: center; } diff --git a/src/components/gui/gui.css b/src/components/gui/gui.css index de9c7f9ec..5146c84f1 100644 --- a/src/components/gui/gui.css +++ b/src/components/gui/gui.css @@ -112,13 +112,6 @@ */ display: flex; flex-direction: column; - - /* - Calc the minimum width for this pane, accounting for left + right spacing. - If and when the width doesn't need to be fixed, we can move the spacing out - of this calc, and into padding instead - */ - flex-basis: calc(480px + ($space * 2)); } .stage-wrapper { diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx index f15a5c9a9..1e7fe027e 100644 --- a/src/components/gui/gui.jsx +++ b/src/components/gui/gui.jsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import {Tab, Tabs, TabList, TabPanel} from 'react-tabs'; +import MediaQuery from 'react-responsive'; import tabStyles from 'react-tabs/style/react-tabs.css'; import VM from 'scratch-vm'; @@ -16,9 +17,9 @@ import StopAll from '../../containers/stop-all.jsx'; import Box from '../box/box.jsx'; import MenuBar from '../menu-bar/menu-bar.jsx'; +import layout from '../../lib/layout-constants.js'; import styles from './gui.css'; - const GUIComponent = props => { const { basePath, @@ -87,20 +88,22 @@ const GUIComponent = props => { - - + + - - - + + {isFullSize => ( + + )} - - + diff --git a/src/components/sprite-info/sprite-info.jsx b/src/components/sprite-info/sprite-info.jsx index fc68c9121..8b3f212d9 100644 --- a/src/components/sprite-info/sprite-info.jsx +++ b/src/components/sprite-info/sprite-info.jsx @@ -1,12 +1,14 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; +import MediaQuery from 'react-responsive'; import Box from '../box/box.jsx'; import Label from '../forms/label.jsx'; import Input from '../forms/input.jsx'; import BufferedInputHOC from '../forms/buffered-input-hoc.jsx'; +import layout from '../../lib/layout-constants.js'; import styles from './sprite-info.css'; import xIcon from './icon--x.svg'; @@ -49,12 +51,14 @@ class SpriteInfo extends React.Component {
-
- -
+ +
+ +
+