Skip to content

Commit

Permalink
Update to material-ui v4
Browse files Browse the repository at this point in the history
  • Loading branch information
psamim committed Jun 25, 2019
1 parent a7644c7 commit 4a5b67e
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions lib/Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ var styles = function styles(theme) {
return {
arrayItem: {
position: "relative",
padding: theme.spacing.unit,
marginTop: theme.spacing.unit,
padding: theme.spacing(),
marginTop: theme.spacing(),
display: "flex"
},
deleteItemButton: {
margin: [[-theme.spacing.unit, -theme.spacing.unit, "auto", "auto"]]
margin: [[theme.spacing(-1), theme.spacing(-1), "auto", "auto"]]
},
addButton: {
marginLeft: theme.spacing.unit
marginLeft: theme.spacing()
},
elementsContainer: {
display: "flex",
Expand Down
4 changes: 2 additions & 2 deletions lib/FieldSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var styles = function styles(theme) {
return {
root: {
marginTop: theme.spacing.unit
marginTop: theme.spacing(1)
},
fields: {
marginLeft: theme.spacing.unit
marginLeft: theme.spacing(1)
}
};
};
Expand Down
2 changes: 1 addition & 1 deletion lib/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var styles = function styles(theme) {
flexWrap: "wrap"
},
chip: {
margin: theme.spacing.unit / 4
margin: theme.spacing(0.25)
},
menuItem: {
fontWeight: theme.typography.fontWeightRegular
Expand Down
4 changes: 2 additions & 2 deletions lib/Radios.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
var styles = function styles(theme) {
return {
formControl: {
marginTop: theme.spacing.unit
marginTop: theme.spacing(1)
},
group: {
margin: theme.spacing.unit + "px 0"
margin: theme.spacing(1, 0)
}
};
};
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"devDependencies": {
"@babel/preset-flow": "^7.0.0",
"@material-ui/core": "^3.7.1",
"@material-ui/icons": "3.0.1",
"@material-ui/core": "^4.0.0",
"@material-ui/icons": "^4.0.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "^10.0.1",
Expand Down Expand Up @@ -75,8 +75,8 @@
"peerDependencies": {
"react": "*",
"react-dom": "*",
"@material-ui/core": ">=3.2.0",
"@material-ui/icons": ">=3.0.0"
"@material-ui/core": ">=4.0.0",
"@material-ui/icons": ">=4.0.0"
},
"scripts": {
"preversion": "webpack -p",
Expand Down
8 changes: 4 additions & 4 deletions src/Array.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import type { Localization } from "./types";
const styles = theme => ({
arrayItem: {
position: "relative",
padding: theme.spacing.unit,
marginTop: theme.spacing.unit,
padding: theme.spacing(),
marginTop: theme.spacing(),
display: "flex"
},
deleteItemButton: {
margin: [[-theme.spacing.unit, -theme.spacing.unit, "auto", "auto"]]
margin: [[theme.spacing(-1), theme.spacing(-1), "auto", "auto"]]
},
addButton: {
marginLeft: theme.spacing.unit
marginLeft: theme.spacing()
},
elementsContainer: {
display: "flex",
Expand Down
4 changes: 2 additions & 2 deletions src/FieldSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import type { Localization } from "./types";

const styles = theme => ({
root: {
marginTop: theme.spacing.unit
marginTop: theme.spacing(1)
},
fields: {
marginLeft: theme.spacing.unit
marginLeft: theme.spacing(1)
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const styles = theme => ({
flexWrap: "wrap"
},
chip: {
margin: theme.spacing.unit / 4
margin: theme.spacing(0.25)
},
menuItem: {
fontWeight: theme.typography.fontWeightRegular
Expand Down
4 changes: 2 additions & 2 deletions src/Radios.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import type { Localization } from "./types";

const styles = theme => ({
formControl: {
marginTop: theme.spacing.unit
marginTop: theme.spacing(1)
},
group: {
margin: `${theme.spacing.unit}px 0`
margin: theme.spacing(1, 0)
}
});

Expand Down

0 comments on commit 4a5b67e

Please sign in to comment.