Skip to content

Commit

Permalink
Merge pull request #9 from coreui/dev-v2-rc-0
Browse files Browse the repository at this point in the history
v2.0.0-rc.0
  • Loading branch information
xidedix authored May 8, 2018
2 parents d96145a + abc09d5 commit 1ada80b
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 141 deletions.
2 changes: 1 addition & 1 deletion demo/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import './scss/style.css'
// import '../node_modules/@coreui/styles/scss/_dropdown-menu-right.scss';

// Containers
import Full from './containers/Full/Full.js';
import Full from './containers/DefaultLayout/DefaultLayout.js';

// import { renderRoutes } from 'react-router-config';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import { Container, Nav, NavItem, NavLink, Badge, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import { Container, Nav, NavItem, NavLink, Badge, DropdownToggle, DropdownMenu } from 'reactstrap';

import {
AppAside,
Expand All @@ -27,7 +27,7 @@ import logo from '../../assets/img/brand/logo.svg'
import sygnet from '../../assets/img/brand/sygnet.svg'
import avatar from '../../assets/img/avatars/6.jpg'

class Full extends Component {
class DefaultLayout extends Component {
render() {
return (
<div className="app">
Expand Down Expand Up @@ -88,12 +88,13 @@ class Full extends Component {
Aside
</AppAside>
</div>
<AppFooter fixed>
<AppFooter>
<span><a href="https://coreui.io">CoreUI</a> &copy; 2018 creativeLabs.</span>
<span className="ml-auto">Powered by <a href="https://coreui.io/react">CoreUI for React</a></span> </AppFooter>
<span className="ml-auto">Powered by <a href="https://coreui.io/react">CoreUI for React</a></span>
</AppFooter>
</div>
);
}
}

export default Full;
export default DefaultLayout;
2 changes: 1 addition & 1 deletion demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './polyfill'
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
// import registerServiceWorker from './registerServiceWorker';
import './polyfill'

ReactDOM.render(<App />, document.querySelector('#demo'))
// ReactDOM.render(<App />, document.getElementById('root'));
Expand Down
68 changes: 44 additions & 24 deletions demo/src/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
// IE11 polyfills

if (!Array.prototype.find) {
Array.prototype.find = function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
const list = Object(this);
const length = list.length >>> 0;
const thisArg = arguments[1];
let value;

for (let i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
};
}
/*
* required polyfills
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol'
// import 'core-js/es6/object'
// import 'core-js/es6/function'
// import 'core-js/es6/parse-int'
// import 'core-js/es6/parse-float'
// import 'core-js/es6/number'
// import 'core-js/es6/math'
// import 'core-js/es6/string'
// import 'core-js/es6/date'
import 'core-js/es6/array'
// import 'core-js/es6/regexp'
import 'core-js/es6/map'
// import 'core-js/es6/weak-map'
import 'core-js/es6/set'
import 'core-js/es7/object'

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect'

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
// import 'core-js/es7/reflect'

// CustomEvent() constructor functionality in IE9, IE10, IE11
(function () {

if ( typeof window.CustomEvent === "function" ) return false

function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined }
var evt = document.createEvent( 'CustomEvent' )
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail )
return evt
}

CustomEvent.prototype = window.Event.prototype

window.CustomEvent = CustomEvent
})()
4 changes: 2 additions & 2 deletions demo/src/routes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Dashboard from './views/Dashboard/Dashboard.js';
import Full from './containers/Full/Full.js';
import Full from './containers/DefaultLayout/DefaultLayout.js';

// https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
const routes = [
{ path: '/', exact: true, name: 'Home', component: Full },
{ path: '/dashboard', name: 'Dashboard', component: Dashboard },
];

export default routes;
export default routes;
Loading

0 comments on commit 1ada80b

Please sign in to comment.