minor fixes chart-wrapper & dropdown-menu-right & components

This commit is contained in:
xidedix 2017-08-24 16:31:15 +02:00
parent b7ffd29c8e
commit 2aa3baa6ee
14 changed files with 44 additions and 74 deletions

18
.gitignore vendored Normal file
View File

@ -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

View File

@ -11,6 +11,8 @@ build
# misc
.DS_Store
Thumbs.db
.env
.idea
npm-debug.log
compilation-stats.json

View File

@ -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

View File

@ -12,9 +12,9 @@
.chart-wrapper {
position: absolute;
top: 18px;
left: 45%;
left: 50%;
float: right;
width: 100px;
width: 60%;
}
}

View File

@ -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;

View File

@ -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) => <Route key={i++} path={path} component={BreadcrumbsItem}/>);
return (
<Breadcrumb>

View File

@ -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) => {

View File

@ -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',

View File

@ -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/';

View File

@ -11,6 +11,8 @@ build
# misc
.DS_Store
Thumbs.db
.env
.idea
npm-debug.log
compilation-stats.json

View File

@ -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

View File

@ -12,9 +12,9 @@
.chart-wrapper {
position: absolute;
top: 18px;
left: 45%;
left: 50%;
float: right;
width: 100px;
width: 60%;
}
}

View File

@ -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;