Skip to content

Commit 7adb49c

Browse files
committed
fix alert, progress, menu styles
1 parent 9b335a2 commit 7adb49c

File tree

11 files changed

+44
-56
lines changed

11 files changed

+44
-56
lines changed

lib/components/App.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@ var react_redux_1 = require('react-redux');
2626
var index_1 = require('./index');
2727
var Routes_1 = require('./Routes');
2828
var Drawer_1 = require('material-ui/Drawer');
29-
var height = atom.getSize().height;
30-
window.onresize = function () {
31-
height = atom.getSize().height;
32-
};
3329
var App = (function (_super) {
3430
__extends(App, _super);
3531
function App() {
3632
_super.apply(this, arguments);
3733
}
3834
App.prototype.render = function () {
3935
var store = this.props.store;
40-
return (React.createElement("section", {style: { height: height }, className: 'cr-bg'}, React.createElement(Drawer_1.default, {width: 400, openSecondary: true, open: store.open}, React.createElement("div", {className: 'cr-bg'}, React.createElement(index_1.AppMenu, __assign({}, store)), React.createElement(Routes_1.Routes, __assign({}, store)), React.createElement(index_1.Alert, __assign({}, store))))));
36+
return (React.createElement("section", null, React.createElement(Drawer_1.default, {width: 400, openSecondary: true, open: store.open}, React.createElement("div", {className: 'cr-bg'}, React.createElement(index_1.AppMenu, __assign({}, store)), React.createElement(Routes_1.Routes, __assign({}, store)))), React.createElement(index_1.Alert, __assign({}, store))));
4137
};
4238
App = __decorate([
4339
react_redux_1.connect(function (store) {

lib/components/AppMenu/MenuLink/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var MenuItem_1 = require('material-ui/MenuItem');
1919
var actions_1 = require('../../../actions');
2020
var styles = {
2121
textAlign: 'center',
22-
padding: '10px 5px',
22+
padding: '0px 2px',
2323
};
2424
var MenuLink = (function (_super) {
2525
__extends(MenuLink, _super);

lib/components/AppMenu/Quit/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var subscriptions_1 = require('../../../atom/subscriptions');
2020
var MenuItem_1 = require('material-ui/MenuItem');
2121
var styles = {
2222
textAlign: 'center',
23-
padding: '10px 5px',
23+
padding: '0px 2px',
2424
};
2525
var Quit = (function (_super) {
2626
__extends(Quit, _super);

lib/components/Page/Hints/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var help_1 = require('material-ui/svg-icons/action/help');
77
var styles = {
88
position: 'relative',
99
margin: '-5px 20px',
10-
right: '10px',
1110
width: '360px',
1211
textAlign: 'center',
1312
zIndex: '0',

lib/components/Progress/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ var Subheader_1 = require('material-ui/Subheader');
66
var ProgressPage_1 = require('./ProgressPage');
77
var pageStyle = {
88
width: '100%',
9-
margin: '0px',
9+
};
10+
var listStyle = {
11+
margin: '5px',
1012
};
1113
exports.Progress = function (_a) {
1214
var progress = _a.progress, pagePosition = _a.pagePosition, info = _a.info, tutorial = _a.tutorial;
13-
return (React.createElement(Paper_1.default, {style: pageStyle}, React.createElement(List_1.List, null, React.createElement(Subheader_1.default, null, info.name), tutorial.pages.map(function (page, index) { return (React.createElement(ProgressPage_1.ProgressPage, {key: index, index: index, page: page, pagePosition: pagePosition, progress: progress})); }))));
15+
return (React.createElement(Paper_1.default, {style: pageStyle}, React.createElement(List_1.List, {style: listStyle}, React.createElement(Subheader_1.default, null, info.name), tutorial.pages.map(function (page, index) { return (React.createElement(ProgressPage_1.ProgressPage, {key: index, index: index, page: page, pagePosition: pagePosition, progress: progress})); }))));
1416
};

src/components/Alert/_alert.less

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
@import "ui-variables";
2-
#crv {
3-
.cr-alert {
4-
button {
5-
position: relative;
6-
span {
7-
position: absolute;
8-
top: -8px;
9-
}
2+
.cr-alert {
3+
button {
4+
position: relative;
5+
span {
6+
position: absolute;
7+
top: -8px;
108
}
119
}
12-
.cr-alert.pass button span {
13-
color: @background-color-success;
14-
}
15-
.cr-alert.fail button span {
16-
color: @background-color-error;
17-
}
18-
.cr-alert.note button span {
19-
color: @background-color-info;
20-
}
21-
.cr-alert-replay {
22-
display: inline-block;
23-
margin: 0 10px;
24-
}
10+
}
11+
.cr-alert.pass button span {
12+
color: @background-color-success;
13+
}
14+
.cr-alert.fail button span {
15+
color: @background-color-error;
16+
}
17+
.cr-alert.note button span {
18+
color: @background-color-info;
19+
}
20+
.cr-alert-replay {
21+
display: inline-block;
22+
margin: 0 10px;
2523
}

src/components/App.tsx

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,27 @@ import {connect} from 'react-redux';
33
import {AppMenu, Alert} from './index';
44
import {Routes} from './Routes';
55
import Drawer from 'material-ui/Drawer';
6-
// import {Hold} from './Hold';
76
import Menu from 'material-ui/svg-icons/navigation/menu';
87

9-
let height: number = atom.getSize().height;
10-
window.onresize = function() {
11-
height = atom.getSize().height;
12-
};
13-
148
@connect((store: CR.State) => {
159
return { store };
1610
})
1711
export class App extends React.Component<{store?: CR.State}, {}> {
1812
render(): React.ReactElement<{}> {
1913
const store = this.props.store;
2014
return (
21-
<section
22-
style={{height}}
23-
className='cr-bg'
24-
>
25-
<Drawer
26-
width={400}
27-
openSecondary={true}
28-
open={store.open}
15+
<section>
16+
<Drawer
17+
width={400}
18+
openSecondary={true}
19+
open={store.open}
2920
>
30-
<div className='cr-bg'>
31-
<AppMenu {...store} />
32-
<Routes {...store} />
33-
<Alert {...store} />
34-
</div>
35-
</Drawer>
21+
<div className='cr-bg'>
22+
<AppMenu {...store} />
23+
<Routes {...store} />
24+
</div>
25+
</Drawer>
26+
<Alert {...store} />
3627
</section>
3728
);
3829
}

src/components/AppMenu/MenuLink/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {pageSet, routeSet} from '../../../actions';
55

66
const styles = {
77
textAlign: 'center',
8-
padding: '10px 5px',
8+
padding: '0px 2px',
99
};
1010

1111
@connect(null, (dispatch) => {

src/components/AppMenu/Quit/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import MenuItem from 'material-ui/MenuItem';
66

77
const styles = {
88
textAlign: 'center',
9-
padding: '10px 5px',
9+
padding: '0px 2px',
1010
};
1111

1212
@connect(null, (dispatch) => {

src/components/Page/Hints/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Help from 'material-ui/svg-icons/action/help';
77
const styles = {
88
position: 'relative',
99
margin: '-5px 20px',
10-
right: '10px',
1110
width: '360px',
1211
textAlign: 'center',
1312
zIndex: '0',

src/components/Progress/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ import {ProgressPage} from './ProgressPage';
66

77
const pageStyle = {
88
width: '100%',
9-
margin: '0px',
9+
};
10+
11+
const listStyle = {
12+
margin: '5px',
1013
};
1114

1215
export const Progress: React.StatelessComponent<{
1316
progress: CR.Progress, pagePosition: CR.PagePosition,
1417
info: Tutorial.Info, tutorial: CR.Tutorial
1518
}> = ({progress, pagePosition, info, tutorial}) => (
1619
<Paper style={pageStyle}>
17-
<List>
20+
<List style={listStyle}>
1821
<Subheader>{info.name}</Subheader>
1922
{tutorial.pages.map((page: CR.Page, index: number) => (
2023
<ProgressPage

0 commit comments

Comments
 (0)