From 2aa3baa6ee645c99de97a0c86879bafeeb0389a7 Mon Sep 17 00:00:00 2001 From: xidedix Date: Thu, 24 Aug 2017 16:31:15 +0200 Subject: [PATCH] minor fixes chart-wrapper & dropdown-menu-right & components --- .gitignore | 18 +++++++++++ React_Full_Project/.gitignore | 2 ++ React_Full_Project/CORE_REACT.md | 30 ------------------- React_Full_Project/scss/core/_callout.scss | 4 +-- React_Full_Project/scss/core/_temp.scss | 7 +++-- .../src/components/Breadcrumb/Breadcrumb.js | 2 -- .../src/components/Sidebar/Sidebar.js | 2 +- .../src/components/Sidebar/_nav.js | 4 +-- .../src/containers/Full/Full.js | 4 +++ React_Full_Project/src/index.js | 2 +- React_Starter/.gitignore | 2 ++ React_Starter/CORE_REACT.md | 30 ------------------- React_Starter/scss/core/_callout.scss | 4 +-- React_Starter/scss/core/_temp.scss | 7 +++-- 14 files changed, 44 insertions(+), 74 deletions(-) create mode 100644 .gitignore delete mode 100644 React_Full_Project/CORE_REACT.md delete mode 100644 React_Starter/CORE_REACT.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85f9a0b --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +node_modules + +# testing +coverage + +# production +build + +# misc +.DS_Store +Thumbs.db +.env +.idea +npm-debug.log +compilation-stats.json diff --git a/React_Full_Project/.gitignore b/React_Full_Project/.gitignore index c6ff9ae..85f9a0b 100644 --- a/React_Full_Project/.gitignore +++ b/React_Full_Project/.gitignore @@ -11,6 +11,8 @@ build # misc .DS_Store +Thumbs.db .env .idea npm-debug.log +compilation-stats.json diff --git a/React_Full_Project/CORE_REACT.md b/React_Full_Project/CORE_REACT.md deleted file mode 100644 index e3339c6..0000000 --- a/React_Full_Project/CORE_REACT.md +++ /dev/null @@ -1,30 +0,0 @@ -# CoreUI React version - -## Intro - -It uses Sass (with .scss). The style is loaded at the component level. - -Dependencies can be handled by **npm**. - -## Directories - -``` -src (js|jsx source) -scss (scss source) -public (html template) -public/img (images) -``` - -## Usage - -**npm i** - to install dependencies - -## Sctipts - -**npm start** for developing (it runs webpack-dev-server) - -**npm run build** to run a dev build - -**npm run clean** to clean build dir - -**npm run dev** to run a dev build with watching filesystem for changes \ No newline at end of file diff --git a/React_Full_Project/scss/core/_callout.scss b/React_Full_Project/scss/core/_callout.scss index 266e2f2..ddd3e22 100644 --- a/React_Full_Project/scss/core/_callout.scss +++ b/React_Full_Project/scss/core/_callout.scss @@ -12,9 +12,9 @@ .chart-wrapper { position: absolute; top: 18px; - left: 45%; + left: 50%; float: right; - width: 100px; + width: 60%; } } diff --git a/React_Full_Project/scss/core/_temp.scss b/React_Full_Project/scss/core/_temp.scss index 356dbb5..d5b4d59 100644 --- a/React_Full_Project/scss/core/_temp.scss +++ b/React_Full_Project/scss/core/_temp.scss @@ -12,7 +12,7 @@ border-radius: 1rem !important; } -// temp fix for Vue-Strap +// temp fix for Vue & React // Open state for the dropdown .open, .show { @@ -20,7 +20,10 @@ > .dropdown-menu { display: block; } - + > .dropdown-menu-right { + right: 0; + left: auto; // Reset the default from `.dropdown-menu` + } // Remove the outline when :focus is triggered > a { outline: 0; diff --git a/React_Full_Project/src/components/Breadcrumb/Breadcrumb.js b/React_Full_Project/src/components/Breadcrumb/Breadcrumb.js index 552c4de..b4f5db9 100644 --- a/React_Full_Project/src/components/Breadcrumb/Breadcrumb.js +++ b/React_Full_Project/src/components/Breadcrumb/Breadcrumb.js @@ -15,7 +15,6 @@ const getPaths = (pathname) => { paths.push(currPath); return currPath; }); - console.log(paths); return paths; }; @@ -41,7 +40,6 @@ const BreadcrumbsItem = ({...rest, match}) => { const Breadcrumbs = ({...rest, location : {pathname}, match}) => { const paths = getPaths(pathname); - // const i = 0; const items = paths.map((path, i) => ); return ( diff --git a/React_Full_Project/src/components/Sidebar/Sidebar.js b/React_Full_Project/src/components/Sidebar/Sidebar.js index eccd9db..1805312 100644 --- a/React_Full_Project/src/components/Sidebar/Sidebar.js +++ b/React_Full_Project/src/components/Sidebar/Sidebar.js @@ -38,7 +38,7 @@ class Sidebar extends Component { }; // simple wrapper for nav-title item - const wrapper = item => { return (!item.wrapper ? item.name : (React.createElement(item.wrapper.element, item.wrapper.attributes, item.name))) }; + const wrapper = item => { return (item.wrapper && item.wrapper.element ? (React.createElement(item.wrapper.element, item.wrapper.attributes, item.name)): item.name ) }; // nav list section title const title = (title, key) => { diff --git a/React_Full_Project/src/components/Sidebar/_nav.js b/React_Full_Project/src/components/Sidebar/_nav.js index 0683416..de8d8ac 100644 --- a/React_Full_Project/src/components/Sidebar/_nav.js +++ b/React_Full_Project/src/components/Sidebar/_nav.js @@ -13,10 +13,10 @@ export default { title: true, name: 'UI elements', wrapper: { // optional wrapper object - element: "span", // required valid HTML5 element tag + element: '', // required valid HTML5 element tag attributes: {} // optional valid JS object with JS API naming ex: { className: "my-class", style: { fontFamily: "Verdana" }, id: "my-id"} }, - class: "" // optional class names space delimited list for title item ex: "text-center" + class: '' // optional class names space delimited list for title item ex: "text-center" }, { name: 'Components', diff --git a/React_Full_Project/src/containers/Full/Full.js b/React_Full_Project/src/containers/Full/Full.js index 9ba5783..c23464e 100644 --- a/React_Full_Project/src/containers/Full/Full.js +++ b/React_Full_Project/src/containers/Full/Full.js @@ -9,6 +9,8 @@ import Footer from '../../components/Footer/'; import Dashboard from '../../views/Dashboard/'; import Charts from '../../views/Charts/'; import Widgets from '../../views/Widgets/'; + +// Components import Buttons from '../../views/Components/Buttons/'; import Cards from '../../views/Components/Cards/'; import Forms from '../../views/Components/Forms/'; @@ -17,6 +19,8 @@ import SocialButtons from '../../views/Components/SocialButtons/'; import Switches from '../../views/Components/Switches/'; import Tables from '../../views/Components/Tables/'; import Tabs from '../../views/Components/Tabs/'; + +// Icons import FontAwesome from '../../views/Icons/FontAwesome/'; import SimpleLineIcons from '../../views/Icons/SimpleLineIcons/'; diff --git a/React_Full_Project/src/index.js b/React_Full_Project/src/index.js index 20a06e3..bc4a448 100644 --- a/React_Full_Project/src/index.js +++ b/React_Full_Project/src/index.js @@ -32,4 +32,4 @@ ReactDOM.render(( -), document.getElementById('root')); \ No newline at end of file +), document.getElementById('root')); diff --git a/React_Starter/.gitignore b/React_Starter/.gitignore index c6ff9ae..1fa4fde 100644 --- a/React_Starter/.gitignore +++ b/React_Starter/.gitignore @@ -11,6 +11,8 @@ build # misc .DS_Store +Thumbs.db .env .idea npm-debug.log +compilation-stats.json \ No newline at end of file diff --git a/React_Starter/CORE_REACT.md b/React_Starter/CORE_REACT.md deleted file mode 100644 index e3339c6..0000000 --- a/React_Starter/CORE_REACT.md +++ /dev/null @@ -1,30 +0,0 @@ -# CoreUI React version - -## Intro - -It uses Sass (with .scss). The style is loaded at the component level. - -Dependencies can be handled by **npm**. - -## Directories - -``` -src (js|jsx source) -scss (scss source) -public (html template) -public/img (images) -``` - -## Usage - -**npm i** - to install dependencies - -## Sctipts - -**npm start** for developing (it runs webpack-dev-server) - -**npm run build** to run a dev build - -**npm run clean** to clean build dir - -**npm run dev** to run a dev build with watching filesystem for changes \ No newline at end of file diff --git a/React_Starter/scss/core/_callout.scss b/React_Starter/scss/core/_callout.scss index 266e2f2..ddd3e22 100644 --- a/React_Starter/scss/core/_callout.scss +++ b/React_Starter/scss/core/_callout.scss @@ -12,9 +12,9 @@ .chart-wrapper { position: absolute; top: 18px; - left: 45%; + left: 50%; float: right; - width: 100px; + width: 60%; } } diff --git a/React_Starter/scss/core/_temp.scss b/React_Starter/scss/core/_temp.scss index 356dbb5..d5b4d59 100644 --- a/React_Starter/scss/core/_temp.scss +++ b/React_Starter/scss/core/_temp.scss @@ -12,7 +12,7 @@ border-radius: 1rem !important; } -// temp fix for Vue-Strap +// temp fix for Vue & React // Open state for the dropdown .open, .show { @@ -20,7 +20,10 @@ > .dropdown-menu { display: block; } - + > .dropdown-menu-right { + right: 0; + left: auto; // Reset the default from `.dropdown-menu` + } // Remove the outline when :focus is triggered > a { outline: 0;