Skip to content

Commit

Permalink
Merge pull request #325 from parallaxinc/quickfix1
Browse files Browse the repository at this point in the history
Fixing button issue on touch screens
  • Loading branch information
monteslu committed Apr 8, 2016
2 parents b15ddf4 + bc09a07 commit 0b20cfa
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 14 deletions.
28 changes: 28 additions & 0 deletions assets/theme/parallax.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,31 @@
background: rgba(155,157,162,0.37);
z-index: 1;
}

.parallax-button{
background: white;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
border: none;
border-radius: 2px;
color: #000;
position: relative;
height: 36px;
margin: 0 5px 0;
min-width: 80px;
padding: 0 16px;
display: inline-block;
font-family: "Roboto","Helvetica","Arial",sans-serif;
font-size: 14px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0;
overflow: hidden;
will-change: box-shadow;
transition: box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1);
outline: none;
cursor: pointer;
text-decoration: none;
text-align: center;
line-height: 36px;
vertical-align: middle;
}
17 changes: 17 additions & 0 deletions src/components/button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

const React = require('react');
const ReactStyle = require('react-style');

export default class Button extends React.Component {
render(){
const {
children,
onClick,
} = this.props

return(
<button onClick={onClick} className="parallax-button">{children}</button>
)
}
}
10 changes: 7 additions & 3 deletions src/components/file-list-item.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const React = require('react');
const ListItem = require('react-material/components/ListItem');

const red = '#da2100';
const green = '#159600';
Expand All @@ -27,15 +26,20 @@ class FileListItem extends React.Component {
onClick
} = this.props;

const liStyle = {
listStyleType: 'none',
padding: "14px 16px 15px"
}

const tempStyles = [styles.fileTempIndicator];
if(temp){
tempStyles.push(styles.fileHasTemp);
}

return (
<ListItem onClick={onClick}>
<li styles={liStyle} onClick={onClick}>
<span styles={tempStyles} /> {filename}
</ListItem>
</li>
);
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/components/project-list-item.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const React = require('react');
const ListItem = require('react-material/components/ListItem');

class Project extends React.Component {
render(){
Expand All @@ -10,10 +9,15 @@ class Project extends React.Component {
children
} = this.props;

const liStyle = {
listStyleType: 'none',
padding: "14px 16px 15px"
}

return (
<ListItem icon="folder" onClick={onClick}>
<li styles={liStyle} icon="folder" onClick={onClick}>
{children}
</ListItem>
</li>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/delete-file-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const React = require('react');
const { createContainer } = require('sovereign');
const Button = require('react-material/components/Button');
const Button = require('../components/button');

const Overlay = require('../components/overlay');
const OverlayTitle = require('../components/overlay-title');
Expand Down
2 changes: 1 addition & 1 deletion src/views/delete-project-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const React = require('react');
const { createContainer } = require('sovereign');
const Button = require('react-material/components/Button');
const Button = require('../components/button');

const Overlay = require('../components/overlay');
const OverlayTitle = require('../components/overlay-title');
Expand Down
2 changes: 1 addition & 1 deletion src/views/download-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const _ = require('lodash');
const React = require('react');
const Button = require('react-material/components/Button');
const Button = require('../components/button');
const Loader = require('react-loader');
const { createContainer } = require('sovereign');

Expand Down
2 changes: 1 addition & 1 deletion src/views/help-overlay.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const React = require('react');
const Button = require('react-material/components/Button');
const Button = require('../components/button');

const Overlay = require('../components/overlay');
const OverlayTitle = require('../components/overlay-title');
Expand Down
2 changes: 1 addition & 1 deletion src/views/new-version-overlay.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const React = require('react');
const Button = require('react-material/components/Button');
const Button = require('../components/button');

const Overlay = require('../components/overlay');
const OverlayTitle = require('../components/overlay-title');
Expand Down
2 changes: 1 addition & 1 deletion src/views/overwrite-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const React = require('react');
const { createContainer } = require('sovereign');
const Button = require('react-material/components/Button');
const Button = require('../components/button');

const Overlay = require('../components/overlay');
const OverlayTitle = require('../components/overlay-title');
Expand Down
2 changes: 1 addition & 1 deletion src/views/project-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const _ = require('lodash');
const React = require('react');
const { createContainer } = require('sovereign');
const Button = require('react-material/components/Button');
const Button = require('../components/button');
const TextField = require('react-material/components/TextField');

const Overlay = require('../components/overlay');
Expand Down
2 changes: 1 addition & 1 deletion src/views/save-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const React = require('react');
const { createContainer } = require('sovereign');
const Button = require('react-material/components/Button');
const Button = require('../components/button');
const TextField = require('react-material/components/TextField');

const Overlay = require('../components/overlay');
Expand Down

0 comments on commit 0b20cfa

Please sign in to comment.