Skip to content

Commit 4e5d693

Browse files
committed
ship: v2.1.0
1 parent 7b358c4 commit 4e5d693

File tree

3 files changed

+51
-39
lines changed

3 files changed

+51
-39
lines changed

CHANGELOG.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
## [CoreUI](https://coreui.io/) for [react](./REACT.md) changelog
22

3+
##### `v2.1.0`
4+
- feat(SidebarNav): navLink `attributes` - optional JS object with valid JS API naming:
5+
- valid attributes: `rel`, `target`, `hidden`, `disabled`, etc...
6+
- starting with `@coreui/coreui`, `@coreui/react` version `2.1.0` and up
7+
- closes #106
8+
- item example(`./src/_nav.js`):
9+
```js
10+
{
11+
name: 'Disabled',
12+
url: '/disabled',
13+
icon: 'icon-ban',
14+
attributes: { disabled: true },
15+
},
16+
{
17+
name: 'Try CoreUI PRO',
18+
url: 'https://coreui.io/pro/react/',
19+
icon: 'cui-layers icons',
20+
variant: 'danger',
21+
attributes: { target: '_blank', rel: "noopener" },
22+
},
23+
```
24+
- fix(Cards): `card-header-actions` added to `CardHeader` for `rtl` support
25+
- feat(Dashboard): new `Suspense` example with Widget03
26+
- chore: update `@coreui/coreui` to `2.1.0`
27+
- chore: update `@coreui/react` to `2.1.0`
28+
- chore: update `node-sass` to `4.10.0`
29+
- chore: update `react` to `16.6.1`
30+
- chore: update `react-dom` to `16.6.1`
31+
- chore: update `react-test-renderer` to `16.6.1`
32+
333
##### `v2.0.14`
434
- chore: update `@coreui/coreui` to `2.0.25`
535
- chore: update `chart.js` to `2.7.3`
@@ -11,7 +41,6 @@
1141
- chore: update `react-test-renderer` to `16.6.0`
1242
- chore: update `react-scripts` to `2.1.1`
1343

14-
1544
##### `v2.0.13`
1645
- refactor: migration to [Create React App 2.0](https://reactjs.org/blog/2018/10/01/create-react-app-v2.html) cleanup
1746
- cleanup `package.json` scripts

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/coreui-free-react-admin-template",
3-
"version": "2.0.14",
3+
"version": "2.1.0",
44
"description": "CoreUI React Open Source Bootstrap 4 Admin Template",
55
"author": "Łukasz Holeczek",
66
"homepage": "https://coreui.io",

src/views/Dashboard/Dashboard.js

+20-37
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React, { Component, lazy, Suspense } from 'react';
22
import { Bar, Line } from 'react-chartjs-2';
33
import {
44
Badge,
@@ -20,10 +20,13 @@ import {
2020
Row,
2121
Table,
2222
} from 'reactstrap';
23-
import Widget03 from '../../views/Widgets/Widget03'
2423
import { CustomTooltips } from '@coreui/coreui-plugin-chartjs-custom-tooltips';
2524
import { getStyle, hexToRgba } from '@coreui/coreui/dist/js/coreui-utilities'
2625

26+
// import Widget03 from '../../views/Widgets/Widget03'
27+
const Widget03 = lazy(() => import('../../views/Widgets/Widget03'));
28+
const Loading = () => <div>Loading...</div>
29+
2730
const brandPrimary = getStyle('--primary')
2831
const brandSuccess = getStyle('--success')
2932
const brandInfo = getStyle('--info')
@@ -637,53 +640,33 @@ class Dashboard extends Component {
637640

638641
<Row>
639642
<Col xs="6" sm="6" lg="3">
640-
<Widget03 dataBox={() => ({ variant: 'facebook', friends: '89k', feeds: '459' })} >
641-
<div className="chart-wrapper">
642-
<Line data={makeSocialBoxData(0)} options={socialChartOpts} height={90} />
643-
</div>
644-
</Widget03>
643+
<Suspense fallback={Loading()}>
644+
<Widget03 dataBox={() => ({ variant: 'facebook', friends: '89k', feeds: '459' })} >
645+
<div className="chart-wrapper">
646+
<Line data={makeSocialBoxData(0)} options={socialChartOpts} height={90} />
647+
</div>
648+
</Widget03>
649+
</Suspense>
645650
</Col>
646651

647652
<Col xs="6" sm="6" lg="3">
648-
<div className="brand-card">
649-
<div className="brand-card-header bg-twitter">
650-
<i className="fa fa-twitter"></i>
653+
<Suspense fallback={Loading()}>
654+
<Widget03 dataBox={() => ({ variant: 'twitter', followers: '973k', tweets: '1.792' })} >
651655
<div className="chart-wrapper">
652656
<Line data={makeSocialBoxData(1)} options={socialChartOpts} height={90} />
653657
</div>
654-
</div>
655-
<div className="brand-card-body">
656-
<div>
657-
<div className="text-value">973k</div>
658-
<div className="text-uppercase text-muted small">followers</div>
659-
</div>
660-
<div>
661-
<div className="text-value">1.792</div>
662-
<div className="text-uppercase text-muted small">tweets</div>
663-
</div>
664-
</div>
665-
</div>
658+
</Widget03>
659+
</Suspense>
666660
</Col>
667661

668662
<Col xs="6" sm="6" lg="3">
669-
<div className="brand-card">
670-
<div className="brand-card-header bg-linkedin">
671-
<i className="fa fa-linkedin"></i>
663+
<Suspense fallback={Loading()}>
664+
<Widget03 dataBox={() => ({ variant: 'linkedin', contacts: '500+', feeds: '292' })} >
672665
<div className="chart-wrapper">
673666
<Line data={makeSocialBoxData(2)} options={socialChartOpts} height={90} />
674667
</div>
675-
</div>
676-
<div className="brand-card-body">
677-
<div>
678-
<div className="text-value">500+</div>
679-
<div className="text-uppercase text-muted small">contacts</div>
680-
</div>
681-
<div>
682-
<div className="text-value">292</div>
683-
<div className="text-uppercase text-muted small">feeds</div>
684-
</div>
685-
</div>
686-
</div>
668+
</Widget03>
669+
</Suspense>
687670
</Col>
688671

689672
<Col xs="6" sm="6" lg="3">

0 commit comments

Comments
 (0)