minor fixes chart-wrapper & dropdown-menu-right & components
This commit is contained in:
parent
b7ffd29c8e
commit
2aa3baa6ee
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal 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
|
2
React_Full_Project/.gitignore
vendored
2
React_Full_Project/.gitignore
vendored
@ -11,6 +11,8 @@ build
|
|||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
.env
|
.env
|
||||||
.idea
|
.idea
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
compilation-stats.json
|
||||||
|
@ -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
|
|
@ -12,9 +12,9 @@
|
|||||||
.chart-wrapper {
|
.chart-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 18px;
|
top: 18px;
|
||||||
left: 45%;
|
left: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
width: 100px;
|
width: 60%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
border-radius: 1rem !important;
|
border-radius: 1rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// temp fix for Vue-Strap
|
// temp fix for Vue & React
|
||||||
|
|
||||||
// Open state for the dropdown
|
// Open state for the dropdown
|
||||||
.open, .show {
|
.open, .show {
|
||||||
@ -20,7 +20,10 @@
|
|||||||
> .dropdown-menu {
|
> .dropdown-menu {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
> .dropdown-menu-right {
|
||||||
|
right: 0;
|
||||||
|
left: auto; // Reset the default from `.dropdown-menu`
|
||||||
|
}
|
||||||
// Remove the outline when :focus is triggered
|
// Remove the outline when :focus is triggered
|
||||||
> a {
|
> a {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
@ -15,7 +15,6 @@ const getPaths = (pathname) => {
|
|||||||
paths.push(currPath);
|
paths.push(currPath);
|
||||||
return currPath;
|
return currPath;
|
||||||
});
|
});
|
||||||
console.log(paths);
|
|
||||||
return paths;
|
return paths;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -41,7 +40,6 @@ const BreadcrumbsItem = ({...rest, match}) => {
|
|||||||
|
|
||||||
const Breadcrumbs = ({...rest, location : {pathname}, match}) => {
|
const Breadcrumbs = ({...rest, location : {pathname}, match}) => {
|
||||||
const paths = getPaths(pathname);
|
const paths = getPaths(pathname);
|
||||||
// const i = 0;
|
|
||||||
const items = paths.map((path, i) => <Route key={i++} path={path} component={BreadcrumbsItem}/>);
|
const items = paths.map((path, i) => <Route key={i++} path={path} component={BreadcrumbsItem}/>);
|
||||||
return (
|
return (
|
||||||
<Breadcrumb>
|
<Breadcrumb>
|
||||||
|
@ -38,7 +38,7 @@ class Sidebar extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// simple wrapper for nav-title item
|
// 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
|
// nav list section title
|
||||||
const title = (title, key) => {
|
const title = (title, key) => {
|
||||||
|
@ -13,10 +13,10 @@ export default {
|
|||||||
title: true,
|
title: true,
|
||||||
name: 'UI elements',
|
name: 'UI elements',
|
||||||
wrapper: { // optional wrapper object
|
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"}
|
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',
|
name: 'Components',
|
||||||
|
@ -9,6 +9,8 @@ import Footer from '../../components/Footer/';
|
|||||||
import Dashboard from '../../views/Dashboard/';
|
import Dashboard from '../../views/Dashboard/';
|
||||||
import Charts from '../../views/Charts/';
|
import Charts from '../../views/Charts/';
|
||||||
import Widgets from '../../views/Widgets/';
|
import Widgets from '../../views/Widgets/';
|
||||||
|
|
||||||
|
// Components
|
||||||
import Buttons from '../../views/Components/Buttons/';
|
import Buttons from '../../views/Components/Buttons/';
|
||||||
import Cards from '../../views/Components/Cards/';
|
import Cards from '../../views/Components/Cards/';
|
||||||
import Forms from '../../views/Components/Forms/';
|
import Forms from '../../views/Components/Forms/';
|
||||||
@ -17,6 +19,8 @@ import SocialButtons from '../../views/Components/SocialButtons/';
|
|||||||
import Switches from '../../views/Components/Switches/';
|
import Switches from '../../views/Components/Switches/';
|
||||||
import Tables from '../../views/Components/Tables/';
|
import Tables from '../../views/Components/Tables/';
|
||||||
import Tabs from '../../views/Components/Tabs/';
|
import Tabs from '../../views/Components/Tabs/';
|
||||||
|
|
||||||
|
// Icons
|
||||||
import FontAwesome from '../../views/Icons/FontAwesome/';
|
import FontAwesome from '../../views/Icons/FontAwesome/';
|
||||||
import SimpleLineIcons from '../../views/Icons/SimpleLineIcons/';
|
import SimpleLineIcons from '../../views/Icons/SimpleLineIcons/';
|
||||||
|
|
||||||
|
@ -32,4 +32,4 @@ ReactDOM.render((
|
|||||||
<Route path="/" name="Home" component={Full}/>
|
<Route path="/" name="Home" component={Full}/>
|
||||||
</Switch>
|
</Switch>
|
||||||
</HashRouter>
|
</HashRouter>
|
||||||
), document.getElementById('root'));
|
), document.getElementById('root'));
|
||||||
|
2
React_Starter/.gitignore
vendored
2
React_Starter/.gitignore
vendored
@ -11,6 +11,8 @@ build
|
|||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
.env
|
.env
|
||||||
.idea
|
.idea
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
compilation-stats.json
|
@ -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
|
|
@ -12,9 +12,9 @@
|
|||||||
.chart-wrapper {
|
.chart-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 18px;
|
top: 18px;
|
||||||
left: 45%;
|
left: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
width: 100px;
|
width: 60%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
border-radius: 1rem !important;
|
border-radius: 1rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// temp fix for Vue-Strap
|
// temp fix for Vue & React
|
||||||
|
|
||||||
// Open state for the dropdown
|
// Open state for the dropdown
|
||||||
.open, .show {
|
.open, .show {
|
||||||
@ -20,7 +20,10 @@
|
|||||||
> .dropdown-menu {
|
> .dropdown-menu {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
> .dropdown-menu-right {
|
||||||
|
right: 0;
|
||||||
|
left: auto; // Reset the default from `.dropdown-menu`
|
||||||
|
}
|
||||||
// Remove the outline when :focus is triggered
|
// Remove the outline when :focus is triggered
|
||||||
> a {
|
> a {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user