-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AB#32085: Add UI for testing line timetable generation (#111)
- Loading branch information
Showing
3 changed files
with
117 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { observer } from 'mobx-react'; | ||
|
||
import styled from 'styled-components'; | ||
import { TextField } from 'material-ui'; | ||
|
||
const SectionHeading = styled.h4` | ||
margin-bottom: 0.5rem; | ||
`; | ||
|
||
const LineSelect = props => ( | ||
<div> | ||
<SectionHeading>Linja</SectionHeading> | ||
<TextField | ||
id="line-select" | ||
placeholder="Kirjoita linjan tunnus (esim. 6211U)" | ||
onChange={event => | ||
event.target.value ? props.onChange(event.target.value) : props.onChange('') | ||
} | ||
style={{ width: '100%' }} | ||
/> | ||
</div> | ||
); | ||
|
||
LineSelect.propTypes = { | ||
onChange: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default observer(LineSelect); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters