Skip to content

Commit

Permalink
Make time entry useable on mobile
Browse files Browse the repository at this point in the history
Ref #49
  • Loading branch information
SpaceK33z committed May 13, 2017
1 parent 85ffc4d commit 3d629c6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions frontend/src/component/InputTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const Overlay = styled.div`
top: 100%;
left: 0;
right: 0;
z-index: 2;
${props => (props.hide ? `display: none;` : null)};
`;

Expand Down
13 changes: 11 additions & 2 deletions frontend/src/component/TimeEntryForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ import styled from 'styled-components';

export const TimeEntryForm = styled(Form)`
display: flex;
margin-bottom: 40px;
margin-bottom: 32px;
align-items: flex-end;
@media (max-width: 400px) {
flex-direction: column;
align-items: stretch;
}
`;

export const TimeEntryFormField = styled(FormField)`
flex: ${props => props.size || 0};
margin: 0 8px;
margin: 0 8px 8px 8px;
@media (max-width: 400px) {
${props => props.center && `align-self: center`}
}
`;
4 changes: 2 additions & 2 deletions frontend/src/container/TimeEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { action } from 'mobx';
import { orderBy, sortBy } from 'lodash';
import { sortBy } from 'lodash';
import moment from 'moment';
import InputText from '../component/InputText';
import InputTime, { InputTimeButton } from '../component/InputTime';
Expand Down Expand Up @@ -111,7 +111,7 @@ export default class TimeEntry extends Component {
}

return (
<TimeEntryFormField label="">
<TimeEntryFormField label="" center>
<Icon big icon={icon} />
</TimeEntryFormField>
);
Expand Down

0 comments on commit 3d629c6

Please sign in to comment.