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

Use @material-ui/core v1.0.0 #249

Closed
wants to merge 6 commits into from
Closed
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
2,411 changes: 1,142 additions & 1,269 deletions example/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"prepublish": "npm run lint && npm run build"
},
"dependencies": {
"@material-ui/core": "^1.0.0",
"babel-polyfill": "^6.26.0",
"html-loader": "^0.5.1",
"json-loader": "^0.5.7",
"markdown-loader": "^2.0.1",
"material-ui": "next",
"raw-loader": "^0.5.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
Expand Down
12 changes: 6 additions & 6 deletions example/src/Example.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Redux Form Material UI Wrappers

This is a simple demonstration of how to connect all the standard (MUI V1.0)
[`material-ui`](https://github.com/callemall/material-ui) form elements to
[`material-ui`](https://github.com/mui-org/material-ui) form elements to
[`redux-form`](https://github.com/erikras/redux-form) using the
[`redux-form-material-ui`](https://github.com/erikras/redux-form-material-ui) wrapper library.

Expand All @@ -10,11 +10,11 @@ You simply provide the string name of the Material UI component you want to rend

Available components:

* [Checkbox](http://www.material-ui.com/#/components/checkbox)
* [RadioGroup](http://www.material-ui.com/#/components/radio-button)
* [Select](http://www.material-ui.com/#/components/Select)
* [TextField](http://www.material-ui.com/#/components/text-field)
* [Switch](https://material.io/guidelines/components/lists-controls.html#lists-controls-types-of-list-controls)
* [Checkbox](https://material-ui-next.com/api/checkbox)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The material-ui Page is updated now. So you can actually go directly to https://material-ui.com/api/checkbox.

* [RadioGroup](https://material-ui-next.com/api/radio-group)
* [Select](https://material-ui-next.com/api/select)
* [TextField](https://material-ui-next.com/api/text-field)
* [Switch](https://material-ui-next.com/api/switch)

The code for this example is
[available here](https://github.com/erikras/redux-form-material-ui/tree/master/example).
9 changes: 5 additions & 4 deletions example/src/Form.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Field, reduxForm, formValueSelector } from 'redux-form'
import { MenuItem } from 'material-ui/Menu';
import { InputLabel } from 'material-ui/Input';
import Radio from 'material-ui/Radio';
import { FormControl, FormControlLabel } from 'material-ui/Form';
import MenuItem from '@material-ui/core/MenuItem';
import InputLabel from '@material-ui/core/InputLabel';
import Radio from '@material-ui/core/Radio';
import FormControl from '@material-ui/core/FormControl';
import FormControlLabel from '@material-ui/core/FormControlLabel';

import {
Checkbox,
Expand Down
2 changes: 1 addition & 1 deletion example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import injectTapEventPlugin from 'react-tap-event-plugin'
import { Provider } from 'react-redux'
import { createStore, combineReducers } from 'redux'
import { reducer as reduxFormReducer } from 'redux-form'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider'
import { Code, Markdown, Values } from 'redux-form-website-template'
injectTapEventPlugin()
const dest = document.getElementById('content')
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"homepage": "https://github.com/erikras/redux-form-material-ui",
"devDependencies": {
"@material-ui/core": "^1.0.0",
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-eslint": "^7.2.3",
Expand All @@ -61,7 +62,6 @@
"isparta": "^4.0.0",
"jsdom": "^11.1.0",
"lodash.noop": "^3.0.1",
"material-ui": "v1.0.0-beta.16",
"mocha": "^3.5.0",
"mocha-lcov-reporter": "^1.3.0",
"nyc": "^11.1.0",
Expand All @@ -74,9 +74,9 @@
"webpack": "^3.5.2"
},
"peerDependencies": {
"@material-ui/core": ">=1.0.0",
"react": "^15.0.0 || ^16.0.0",
"redux-form": "7",
"material-ui": ">=1.0.0-beta.16"
"redux-form": "7"
},
"files": [
"README.md",
Expand Down
2 changes: 1 addition & 1 deletion src/Checkbox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Checkbox from 'material-ui/Checkbox'
import Checkbox from '@material-ui/core/Checkbox'
import createComponent from './createComponent'

export default createComponent(Checkbox, ({
Expand Down
2 changes: 1 addition & 1 deletion src/RadioGroup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RadioGroup } from 'material-ui/Radio'
import RadioGroup from '@material-ui/core/RadioGroup'
import createComponent from './createComponent'

export default createComponent(RadioGroup, ({
Expand Down
2 changes: 1 addition & 1 deletion src/Select.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Select from 'material-ui/Select'
import Select from '@material-ui/core/Select'
import createComponent from './createComponent'
import mapError from './mapError'

Expand Down
2 changes: 1 addition & 1 deletion src/Switch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Switch from 'material-ui/Switch'
import Switch from '@material-ui/core/Switch'
import createComponent from './createComponent'

export default createComponent(Switch, ({
Expand Down
2 changes: 1 addition & 1 deletion src/TextField.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TextField from 'material-ui/TextField'
import TextField from '@material-ui/core/TextField'
import createComponent from './createComponent'
import mapError from './mapError'

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Checkbox.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import expect from 'expect'
import expectJsx from 'expect-jsx'
import noop from 'lodash.noop'
import Checkbox from 'material-ui/Checkbox'
import Checkbox from '@material-ui/core/Checkbox'
import React from 'react'
import ReduxFormMaterialUICheckbox from '../Checkbox'

Expand All @@ -10,7 +10,7 @@ expect.extend(expectJsx)
describe('Checkbox', () => {
it('has a display name', () => {
expect(ReduxFormMaterialUICheckbox.displayName).toBe(
'ReduxFormMaterialUIStyle'
'ReduxFormMaterialUIWithStyles'
)
})

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/RadioGroup.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect'
import expectJsx from 'expect-jsx'
import { RadioGroup } from 'material-ui/Radio'
import RadioGroup from '@material-ui/core/RadioGroup'
import React from 'react'
import noop from 'lodash.noop'
import TestUtils from 'react-dom/test-utils'
Expand All @@ -11,7 +11,7 @@ expect.extend(expectJsx)
describe('RadioGroup', () => {
it('has a display name', () => {
expect(ReduxFormMaterialUIRadioGroup.displayName).toBe(
'ReduxFormMaterialUIStyle'
'ReduxFormMaterialUIRadioGroup'
)
})

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Select.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect'
import expectJsx from 'expect-jsx'
import Select from 'material-ui/Select'
import Select from '@material-ui/core/Select'
import React from 'react'
import ReduxFormMaterialUISelect from '../Select'

Expand All @@ -9,7 +9,7 @@ expect.extend(expectJsx)
describe('Select', () => {
it('has a display name', () => {
expect(ReduxFormMaterialUISelect.displayName).toBe(
'ReduxFormMaterialUIStyle'
'ReduxFormMaterialUIWithStyles'
)
})

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Switch.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import expect from 'expect'
import expectJsx from 'expect-jsx'
import noop from 'lodash.noop'
import Switch from 'material-ui/Switch'
import Switch from '@material-ui/core/Switch'
import React from 'react'
import TestUtils from 'react-dom/test-utils'
import ReduxFormMaterialUISwitch from '../Switch'
Expand All @@ -11,7 +11,7 @@ expect.extend(expectJsx)
describe('Switch', () => {
it('has a display name', () => {
expect(ReduxFormMaterialUISwitch.displayName).toBe(
'ReduxFormMaterialUIStyle'
'ReduxFormMaterialUIWithStyles'
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/TextField.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect'
import expectJsx from 'expect-jsx'
import TextField from 'material-ui/TextField'
import TextField from '@material-ui/core/TextField'
import React from 'react'
import ReduxFormMaterialUITextField from '../TextField'

Expand Down
2 changes: 1 addition & 1 deletion src/mapError.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const mapError = (
...props,
...input,
error: Boolean(error || warning),
helpertext: error || warning
helperText: error || warning
}
: { ...input, ...props })

Expand Down
Loading