From 21d7a41a6a40d86ade82b7037a33e8f2c0cdf2c5 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Fri, 13 Jul 2018 22:42:13 +0800 Subject: [PATCH 01/14] starting with redux form #18 --- README.md | 3 +-- package-lock.json | 23 +++++++++++++++++++++-- package.json | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e16408f..3c8ef72 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ Minimal starter kit with hot module replacement (HMR) for rapid development. - **[Redux](https://redux.js.org/)** Manage the Component states. - **[Redux-Thunk](https://github.com/reduxjs/redux-thunk)** The middle-ware of Redux - **[Redux-toolbelt](https://github.com/welldone-software/redux-toolbelt)** A set of tools for quicker, easier, less verbose and safer Redux development by [welldone-software](http://welldone-software.com/). -- ESLINT for Javascript and ReactJs -- JSHINT standard configuration. +- ESLINT for Javascript and ReactJs. - This project also using **babel-runtime** and **babel-plugin-transform-runtime** to speperate the commonns functions to the other module so the size of the file will be reduced. For details please refer [here](babel-plugin-transform-runtime) * Convert CSS to LESS: http://kronus.me/cn/css2less/ diff --git a/package-lock.json b/package-lock.json index 4f8a861..70b6845 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3633,6 +3633,11 @@ "next-tick": "1.0.0" } }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" + }, "es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", @@ -6768,8 +6773,7 @@ "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, "is-regex": { "version": "1.0.4", @@ -11933,6 +11937,21 @@ } } }, + "redux-form": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-7.4.2.tgz", + "integrity": "sha512-QxC36s4Lelx5Cr8dbpxqvl23dwYOydeAX8c6YPmgkz/Dhj053C16S2qoyZN6LO6HJ2oUF00rKsAyE94GwOUhFA==", + "requires": { + "es6-error": "4.1.1", + "hoist-non-react-statics": "2.5.5", + "invariant": "2.2.4", + "is-promise": "2.1.0", + "lodash": "4.17.10", + "lodash-es": "4.17.10", + "prop-types": "15.6.2", + "react-lifecycles-compat": "3.0.4" + } + }, "redux-immutable-state-invariant": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/redux-immutable-state-invariant/-/redux-immutable-state-invariant-2.1.0.tgz", diff --git a/package.json b/package.json index cd85df1..55eaf8c 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "react-router-redux": "^4.0.8", "react-swipeable-views": "0.12.14", "redux": "4.0.0", + "redux-form": "^7.4.2", "redux-thunk": "2.3.0", "redux-toolbelt": "2.1.5", "redux-toolbelt-thunk": "^2.0.3" From c2e091bb37c5709322d713dafd17651445b5b2e0 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Fri, 13 Jul 2018 22:51:25 +0800 Subject: [PATCH 02/14] add react-redux --save #18 --- package-lock.json | 23 ++--------------------- package.json | 3 +-- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70b6845..4f8a861 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3633,11 +3633,6 @@ "next-tick": "1.0.0" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==" - }, "es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", @@ -6773,7 +6768,8 @@ "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true }, "is-regex": { "version": "1.0.4", @@ -11937,21 +11933,6 @@ } } }, - "redux-form": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-7.4.2.tgz", - "integrity": "sha512-QxC36s4Lelx5Cr8dbpxqvl23dwYOydeAX8c6YPmgkz/Dhj053C16S2qoyZN6LO6HJ2oUF00rKsAyE94GwOUhFA==", - "requires": { - "es6-error": "4.1.1", - "hoist-non-react-statics": "2.5.5", - "invariant": "2.2.4", - "is-promise": "2.1.0", - "lodash": "4.17.10", - "lodash-es": "4.17.10", - "prop-types": "15.6.2", - "react-lifecycles-compat": "3.0.4" - } - }, "redux-immutable-state-invariant": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/redux-immutable-state-invariant/-/redux-immutable-state-invariant-2.1.0.tgz", diff --git a/package.json b/package.json index 55eaf8c..0f7a280 100644 --- a/package.json +++ b/package.json @@ -96,13 +96,12 @@ "react-chartist": "0.13.1", "react-dom": "^16.4.1", "react-google-maps": "^9.4.5", - "react-redux": "5.0.7", + "react-redux": "^5.0.7", "react-redux-thunk-store": "0.0.6", "react-router-dom": "4.3.1", "react-router-redux": "^4.0.8", "react-swipeable-views": "0.12.14", "redux": "4.0.0", - "redux-form": "^7.4.2", "redux-thunk": "2.3.0", "redux-toolbelt": "2.1.5", "redux-toolbelt-thunk": "^2.0.3" From 6e88261515f84b6ad68384394becc6ae46d346ad Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Fri, 13 Jul 2018 22:57:30 +0800 Subject: [PATCH 03/14] update displayIn to save testing time --- tests/components/notification/NotificationItem.test.jsx | 8 ++++---- tests/components/notification/index.test.jsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/components/notification/NotificationItem.test.jsx b/tests/components/notification/NotificationItem.test.jsx index 31b1ce0..c9e9d8d 100644 --- a/tests/components/notification/NotificationItem.test.jsx +++ b/tests/components/notification/NotificationItem.test.jsx @@ -36,12 +36,12 @@ const promiseComponent = ({ displayIn, ...rest }) => setTimeout(() => { if (!called) reject(called); - }, displayIn + 10); + }, displayIn + 2); }); describe(`Testing ${NotificationItem.displayName} component`, () => { test("closeNotification will be called", () => { - const pm = promiseComponent({ displayIn: 200 }); + const pm = promiseComponent({ displayIn: 5 }); return expect(pm).resolves.toBe(true); }); @@ -61,9 +61,9 @@ describe(`Testing ${NotificationItem.displayName} component`, () => { //closeNotification called await expect(p1).rejects.toBe(false); - //DisplayIn = 10 + //DisplayIn = 5ms const p2 = new Promise((resolve, reject) => { - item.setProps({ displayIn: 10, closeNotification: () => resolve(true) }); + item.setProps({ displayIn: 5, closeNotification: () => resolve(true) }); }); //closeNotification called diff --git a/tests/components/notification/index.test.jsx b/tests/components/notification/index.test.jsx index e4950e9..26f3ecd 100644 --- a/tests/components/notification/index.test.jsx +++ b/tests/components/notification/index.test.jsx @@ -74,7 +74,7 @@ describe(`Render ${Notification.displayName} tests`, () => { closeNotification: () => true } ], - displayIn: 10, + displayIn: 2, subsequentDelay: 1 }); From c8f93a5e7ffa7c1ff2a8853d6b15b6ec14a049f9 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Fri, 13 Jul 2018 22:58:42 +0800 Subject: [PATCH 04/14] update timeout --- tests/components/notification/NotificationItem.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/components/notification/NotificationItem.test.jsx b/tests/components/notification/NotificationItem.test.jsx index c9e9d8d..2bdb338 100644 --- a/tests/components/notification/NotificationItem.test.jsx +++ b/tests/components/notification/NotificationItem.test.jsx @@ -56,7 +56,7 @@ describe(`Testing ${NotificationItem.displayName} component`, () => { //DisplayIn = 0 const p1 = new Promise((resolve, reject) => { item.setProps({ closeNotification: () => resolve(true) }); - setTimeout(() => reject(false), 10); + setTimeout(() => reject(false), 5); }); //closeNotification called await expect(p1).rejects.toBe(false); From f5dd9431628191a3e012448f49e359465b33be67 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Sat, 14 Jul 2018 16:19:01 +0800 Subject: [PATCH 05/14] add npm check to cicleci --- .circleci/config.yml | 5 ++++- src/index.jsx | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e342181..70fcc4b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,6 +28,7 @@ jobs: - run: npm install - run: npm install codecov + - run: npm install npm-check - save_cache: paths: @@ -38,7 +39,9 @@ jobs: - run: npm run build # lint - run: npm run lint - # run tests! + # run tests - run: npm run test-ci + # run Check + - run: npm-check diff --git a/src/index.jsx b/src/index.jsx index ce9fc64..b1f1b2d 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -16,7 +16,7 @@ import indexRoutes from "routes/index.jsx"; //Update for Reserved proxy window._base = document.getElementsByTagName("base")[0].getAttribute("href"); -console.info(`base URL ${window._base}`); +console.log(`base URL ${window._base}`); const hist = createBrowserHistory({ basename: window._base }); From 0be59b1e03e436ea8f97d949f27952f49c19710b Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Sat, 14 Jul 2018 16:22:28 +0800 Subject: [PATCH 06/14] update cpmmand --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70fcc4b..4924ff0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,6 @@ jobs: # run tests - run: npm run test-ci # run Check - - run: npm-check + - run: npm run npm-check From f3765815b3ca0790a987b76df8bbcab03b2915ca Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Sat, 14 Jul 2018 16:38:54 +0800 Subject: [PATCH 07/14] update --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4924ff0..d15f200 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,7 +41,5 @@ jobs: - run: npm run lint # run tests - run: npm run test-ci - # run Check - - run: npm run npm-check From 98c9f25b60caac98f32fcf1de4f61288fad85be8 Mon Sep 17 00:00:00 2001 From: Steven Hoang Date: Sat, 14 Jul 2018 19:12:24 +0800 Subject: [PATCH 08/14] moving the style to their components --- .../dropdownStyle.jsx | 162 +++++++++--------- src/components/Card/Card.jsx | 2 +- src/components/Card/CardAvatar.jsx | 2 +- src/components/Card/CardBody.jsx | 2 +- src/components/Card/CardFooter.jsx | 2 +- src/components/Card/CardHeader.jsx | 2 +- src/components/Card/CardIcon.jsx | 2 +- .../Card}/cardAvatarStyle.jsx | 0 .../Card}/cardBodyStyle.jsx | 0 .../Card}/cardFooterStyle.jsx | 0 .../Card}/cardHeaderStyle.jsx | 0 .../Card}/cardIconStyle.jsx | 0 .../Card}/cardStyle.jsx | 0 src/components/CustomButtons/Button.jsx | 2 +- .../CustomButtons}/buttonStyle.jsx | 0 src/components/CustomInput/CustomInput.jsx | 2 +- .../CustomInput}/customInputStyle.jsx | 0 src/components/CustomTabs/CustomTabs.jsx | 4 +- .../CustomTabs}/customTabsStyle.jsx | 0 src/components/Footer/Footer.jsx | 2 +- .../Footer}/footerStyle.jsx | 0 src/components/Header/Header.jsx | 2 +- src/components/Header/HeaderLinks.jsx | 32 ++-- .../Header}/headerLinksStyle.jsx | 0 .../Header}/headerStyle.jsx | 0 src/components/Sidebar/Sidebar.jsx | 4 +- .../Sidebar}/sidebarStyle.jsx | 0 src/components/Snackbar/Snackbar.jsx | 6 +- src/components/Snackbar/SnackbarContent.jsx | 2 +- .../Snackbar}/snackbarContentStyle.jsx | 0 src/components/Table/Table.jsx | 2 +- .../Table}/tableStyle.jsx | 0 src/components/Tasks/Tasks.jsx | 2 +- .../Tasks}/tasksStyle.jsx | 0 src/components/Typography/Danger.jsx | 2 +- src/components/Typography/Info.jsx | 2 +- src/components/Typography/Muted.jsx | 2 +- src/components/Typography/Primary.jsx | 2 +- src/components/Typography/Quote.jsx | 2 +- src/components/Typography/Success.jsx | 2 +- src/components/Typography/Warning.jsx | 2 +- .../Typography}/typographyStyle.jsx | 0 src/layouts/Dashboard.jsx | 2 +- .../layouts/dashboardStyle.jsx | 0 src/views/Dashboard/Dashboard.jsx | 116 ++++++++----- .../Dashboard}/dashboardStyle.jsx | 0 src/views/Icons/Icons.jsx | 2 +- .../views => views/Icons}/iconsStyle.jsx | 0 48 files changed, 197 insertions(+), 171 deletions(-) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardAvatarStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardBodyStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardFooterStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardHeaderStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardIconStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Card}/cardStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/CustomButtons}/buttonStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/CustomInput}/customInputStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/CustomTabs}/customTabsStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Footer}/footerStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Header}/headerLinksStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Header}/headerStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Sidebar}/sidebarStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Snackbar}/snackbarContentStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Table}/tableStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Tasks}/tasksStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/components => components/Typography}/typographyStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react => }/layouts/dashboardStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/views => views/Dashboard}/dashboardStyle.jsx (100%) rename src/{assets/jss/material-dashboard-react/views => views/Icons}/iconsStyle.jsx (100%) diff --git a/src/assets/jss/material-dashboard-react/dropdownStyle.jsx b/src/assets/jss/material-dashboard-react/dropdownStyle.jsx index 60613b8..9738a4a 100644 --- a/src/assets/jss/material-dashboard-react/dropdownStyle.jsx +++ b/src/assets/jss/material-dashboard-react/dropdownStyle.jsx @@ -5,87 +5,87 @@ import { } from "assets/jss/material-dashboard-react.jsx"; const dropdownStyle = theme => ({ - buttonLink: { - [theme.breakpoints.down('md')]:{ - display: 'flex', - marginLeft: '30px', - width: 'auto', - }, - }, - links:{ - width: '20px', - height: '20px', - zIndex: '4', - [theme.breakpoints.down('md')]:{ - display: 'block', - width: '30px', - height: '30px', - color: '#a9afbb', - marginRight: '15px', - }, - }, - linkText: { - zIndex: '4', - ...defaultFont, - fontSize: '14px', - }, - popperClose: { - pointerEvents: 'none', - }, - pooperResponsive: { - [theme.breakpoints.down('md')]: { - zIndex: '1640', - position: 'static', - float: 'none', - width: 'auto', - marginTop: '0', - backgroundColor: 'transparent', - border: '0', - WebkitBoxShadow: 'none', - boxShadow: 'none', - color: 'black' - } - }, - dropdown: { - borderRadius: '3px', - border: '0', - boxShadow: '0 2px 5px 0 rgba(0, 0, 0, 0.26)', - top: '100%', - zIndex: '1000', - minWidth: '160px', - padding: '5px 0', - margin: '2px 0 0', - fontSize: '14px', - textAlign: 'left', - listStyle: 'none', - backgroundColor: '#fff', - WebkitBackgroundClip: 'padding-box', - backgroundClip: 'padding-box', - }, - dropdownItem: { - ...defaultFont, - fontSize: '13px', - padding: '10px 20px', - margin: '0 5px', - borderRadius: '2px', - WebkitTransition: 'all 150ms linear', - MozTransition: 'all 150ms linear', - OTransition: 'all 150ms linear', - MsTransition: 'all 150ms linear', - transition: 'all 150ms linear', - display: 'block', - clear: 'both', - fontWeight: '400', - lineHeight: '1.42857143', - color: '#333', - whiteSpace: 'nowrap', - height: "unset", - '&:hover': { - backgroundColor: primaryColor, - color: '#FFFFFF', - ...primaryBoxShadow, - } - }, + buttonLink: { + [theme.breakpoints.down("md")]: { + display: "flex", + marginLeft: "30px", + width: "auto" + } + }, + links: { + width: "20px", + height: "20px", + zIndex: "4", + [theme.breakpoints.down("md")]: { + display: "block", + width: "30px", + height: "30px", + color: "#a9afbb", + marginRight: "15px" + } + }, + linkText: { + zIndex: "4", + ...defaultFont, + fontSize: "14px" + }, + popperClose: { + pointerEvents: "none" + }, + pooperResponsive: { + [theme.breakpoints.down("md")]: { + zIndex: "1640", + position: "static", + float: "none", + width: "auto", + marginTop: "0", + backgroundColor: "transparent", + border: "0", + WebkitBoxShadow: "none", + boxShadow: "none", + color: "black" + } + }, + dropdown: { + borderRadius: "3px", + border: "0", + boxShadow: "0 2px 5px 0 rgba(0, 0, 0, 0.26)", + top: "100%", + zIndex: "1000", + minWidth: "160px", + padding: "5px 0", + margin: "2px 0 0", + fontSize: "14px", + textAlign: "left", + listStyle: "none", + backgroundColor: "#fff", + WebkitBackgroundClip: "padding-box", + backgroundClip: "padding-box" + }, + dropdownItem: { + ...defaultFont, + fontSize: "13px", + padding: "10px 20px", + margin: "0 5px", + borderRadius: "2px", + WebkitTransition: "all 150ms linear", + MozTransition: "all 150ms linear", + OTransition: "all 150ms linear", + MsTransition: "all 150ms linear", + transition: "all 150ms linear", + display: "block", + clear: "both", + fontWeight: "400", + lineHeight: "1.42857143", + color: "#333", + whiteSpace: "nowrap", + height: "unset", + "&:hover": { + backgroundColor: primaryColor, + color: "#FFFFFF", + ...primaryBoxShadow + } + } }); export default dropdownStyle; diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index d03efb9..dbf9f0f 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardStyle from "assets/jss/material-dashboard-react/components/cardStyle.jsx"; +import cardStyle from "./cardStyle.jsx"; function Card({ ...props }) { const { diff --git a/src/components/Card/CardAvatar.jsx b/src/components/Card/CardAvatar.jsx index 3616c26..ff88ff1 100644 --- a/src/components/Card/CardAvatar.jsx +++ b/src/components/Card/CardAvatar.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardAvatarStyle from "assets/jss/material-dashboard-react/components/cardAvatarStyle.jsx"; +import cardAvatarStyle from "./cardAvatarStyle.jsx"; function CardAvatar({ ...props }) { const { classes, children, className, plain, profile, ...rest } = props; diff --git a/src/components/Card/CardBody.jsx b/src/components/Card/CardBody.jsx index b886d9c..2ee8b30 100644 --- a/src/components/Card/CardBody.jsx +++ b/src/components/Card/CardBody.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardBodyStyle from "assets/jss/material-dashboard-react/components/cardBodyStyle.jsx"; +import cardBodyStyle from "./cardBodyStyle.jsx"; function CardBody({ ...props }) { const { classes, className, children, plain, profile, ...rest } = props; diff --git a/src/components/Card/CardFooter.jsx b/src/components/Card/CardFooter.jsx index dcffbc0..5807a0c 100644 --- a/src/components/Card/CardFooter.jsx +++ b/src/components/Card/CardFooter.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardFooterStyle from "assets/jss/material-dashboard-react/components/cardFooterStyle.jsx"; +import cardFooterStyle from "./cardFooterStyle.jsx"; function CardFooter({ ...props }) { const { diff --git a/src/components/Card/CardHeader.jsx b/src/components/Card/CardHeader.jsx index 4c0f614..63726fc 100644 --- a/src/components/Card/CardHeader.jsx +++ b/src/components/Card/CardHeader.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardHeaderStyle from "assets/jss/material-dashboard-react/components/cardHeaderStyle.jsx"; +import cardHeaderStyle from "./cardHeaderStyle.jsx"; function CardHeader({ ...props }) { const { diff --git a/src/components/Card/CardIcon.jsx b/src/components/Card/CardIcon.jsx index 681e644..eabb006 100644 --- a/src/components/Card/CardIcon.jsx +++ b/src/components/Card/CardIcon.jsx @@ -8,7 +8,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; // @material-ui/icons // core components -import cardIconStyle from "assets/jss/material-dashboard-react/components/cardIconStyle.jsx"; +import cardIconStyle from "./cardIconStyle.jsx"; function CardIcon({ ...props }) { const { classes, className, children, color, ...rest } = props; diff --git a/src/assets/jss/material-dashboard-react/components/cardAvatarStyle.jsx b/src/components/Card/cardAvatarStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardAvatarStyle.jsx rename to src/components/Card/cardAvatarStyle.jsx diff --git a/src/assets/jss/material-dashboard-react/components/cardBodyStyle.jsx b/src/components/Card/cardBodyStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardBodyStyle.jsx rename to src/components/Card/cardBodyStyle.jsx diff --git a/src/assets/jss/material-dashboard-react/components/cardFooterStyle.jsx b/src/components/Card/cardFooterStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardFooterStyle.jsx rename to src/components/Card/cardFooterStyle.jsx diff --git a/src/assets/jss/material-dashboard-react/components/cardHeaderStyle.jsx b/src/components/Card/cardHeaderStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardHeaderStyle.jsx rename to src/components/Card/cardHeaderStyle.jsx diff --git a/src/assets/jss/material-dashboard-react/components/cardIconStyle.jsx b/src/components/Card/cardIconStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardIconStyle.jsx rename to src/components/Card/cardIconStyle.jsx diff --git a/src/assets/jss/material-dashboard-react/components/cardStyle.jsx b/src/components/Card/cardStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/cardStyle.jsx rename to src/components/Card/cardStyle.jsx diff --git a/src/components/CustomButtons/Button.jsx b/src/components/CustomButtons/Button.jsx index b6a83a7..66c395a 100644 --- a/src/components/CustomButtons/Button.jsx +++ b/src/components/CustomButtons/Button.jsx @@ -8,7 +8,7 @@ import PropTypes from "prop-types"; import withStyles from "@material-ui/core/styles/withStyles"; import Button from "@material-ui/core/Button"; -import buttonStyle from "assets/jss/material-dashboard-react/components/buttonStyle.jsx"; +import buttonStyle from "./buttonStyle.jsx"; function RegularButton({ ...props }) { const { classes, diff --git a/src/assets/jss/material-dashboard-react/components/buttonStyle.jsx b/src/components/CustomButtons/buttonStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/buttonStyle.jsx rename to src/components/CustomButtons/buttonStyle.jsx diff --git a/src/components/CustomInput/CustomInput.jsx b/src/components/CustomInput/CustomInput.jsx index 613e9b6..8660f25 100644 --- a/src/components/CustomInput/CustomInput.jsx +++ b/src/components/CustomInput/CustomInput.jsx @@ -10,7 +10,7 @@ import Input from "@material-ui/core/Input"; import Clear from "@material-ui/icons/Clear"; import Check from "@material-ui/icons/Check"; // core components -import customInputStyle from "assets/jss/material-dashboard-react/components/customInputStyle"; +import customInputStyle from "./customInputStyle"; function CustomInput({ ...props }) { const { diff --git a/src/assets/jss/material-dashboard-react/components/customInputStyle.jsx b/src/components/CustomInput/customInputStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/customInputStyle.jsx rename to src/components/CustomInput/customInputStyle.jsx diff --git a/src/components/CustomTabs/CustomTabs.jsx b/src/components/CustomTabs/CustomTabs.jsx index 259f18a..44d0710 100644 --- a/src/components/CustomTabs/CustomTabs.jsx +++ b/src/components/CustomTabs/CustomTabs.jsx @@ -12,9 +12,9 @@ import Tab from "@material-ui/core/Tab"; import Card from "components/Card/Card.jsx"; import CardBody from "components/Card/CardBody.jsx"; import CardHeader from "components/Card/CardHeader.jsx"; -import LinearProgress from '@material-ui/core/LinearProgress'; +import LinearProgress from "@material-ui/core/LinearProgress"; -import customTabsStyle from "assets/jss/material-dashboard-react/components/customTabsStyle.jsx"; +import customTabsStyle from "./customTabsStyle.jsx"; class CustomTabs extends React.Component { state = { diff --git a/src/assets/jss/material-dashboard-react/components/customTabsStyle.jsx b/src/components/CustomTabs/customTabsStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/customTabsStyle.jsx rename to src/components/CustomTabs/customTabsStyle.jsx diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index c2f477e..ee718d6 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -5,7 +5,7 @@ import withStyles from "@material-ui/core/styles/withStyles"; import ListItem from "@material-ui/core/ListItem"; import List from "@material-ui/core/List"; // core components -import footerStyle from "assets/jss/material-dashboard-react/components/footerStyle"; +import footerStyle from "./footerStyle"; function Footer({ ...props }) { const { classes } = props; diff --git a/src/assets/jss/material-dashboard-react/components/footerStyle.jsx b/src/components/Footer/footerStyle.jsx similarity index 100% rename from src/assets/jss/material-dashboard-react/components/footerStyle.jsx rename to src/components/Footer/footerStyle.jsx diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index d90f133..4f6cd02 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -13,7 +13,7 @@ import Menu from "@material-ui/icons/Menu"; import HeaderLinks from "./HeaderLinks"; import Button from "components/CustomButtons/Button"; -import headerStyle from "assets/jss/material-dashboard-react/components/headerStyle.jsx"; +import headerStyle from "./headerStyle.jsx"; function Header({ ...props }) { function makeBrand() { diff --git a/src/components/Header/HeaderLinks.jsx b/src/components/Header/HeaderLinks.jsx index 1ac926b..d1f730b 100644 --- a/src/components/Header/HeaderLinks.jsx +++ b/src/components/Header/HeaderLinks.jsx @@ -18,7 +18,7 @@ import Search from "@material-ui/icons/Search"; import CustomInput from "components/CustomInput/CustomInput.jsx"; import Button from "components/CustomButtons/Button.jsx"; -import headerLinksStyle from "assets/jss/material-dashboard-react/components/headerLinksStyle"; +import headerLinksStyle from "./headerLinksStyle"; class HeaderLinks extends React.Component { state = { @@ -37,21 +37,21 @@ class HeaderLinks extends React.Component { return (
- - -
+ + +