Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make girder-ui compatible with material-ui v4 #118

Merged
merged 1 commit into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/girder-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/girder-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"homepage": "https://github.com/OpenChemistry/oc-web-components#readme",
"dependencies": {
"@openchemistry/girder-redux": "^0.0.22",
"lodash-es": "^4.17.11",
"redux-form-material-ui": "^5.0.0-beta.3"
"lodash-es": "^4.17.11"
},
"devDependencies": {
"@babel/cli": "^7.1.5",
Expand Down
28 changes: 21 additions & 7 deletions packages/girder-ui/src/auth/components/username-login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,33 @@ import {
Dialog,
DialogActions,
DialogContent,
DialogTitle
DialogTitle,
TextField
} from '@material-ui/core';

import red from '@material-ui/core/colors/red';

import InputIcon from '@material-ui/icons/Input';
import ClearIcon from '@material-ui/icons/Clear';

import {
TextField
} from 'redux-form-material-ui';
import { Field } from 'redux-form'

const renderTextField = ({
label,
input,
meta: { touched, invalid, error },
...custom
}) => (
<TextField
label={label}
placeholder={label}
error={touched && invalid}
helperText={touched && error}
{...input}
{...custom}
/>
)

const red500 = red['500'];

const style = {
Expand Down Expand Up @@ -59,7 +73,7 @@ class GirderLogin extends Component {
<Field
fullWidth
name="username"
component={TextField}
component={renderTextField}
placeholder="Username"
label="Username"
/>
Expand All @@ -68,7 +82,7 @@ class GirderLogin extends Component {
<Field
fullWidth
name="password"
component={TextField}
component={renderTextField}
placeholder="Password"
label="Password"
type="password"
Expand All @@ -79,7 +93,7 @@ class GirderLogin extends Component {
<Field
fullWidth
name="mfa"
component={TextField}
component={renderTextField}
placeholder="Multi-factor (if enabled)"
label="Multi-factor (if enabled)"
type="password"
Expand Down