Skip to content

Commit ce3e8f7

Browse files
committed
chore: add deprecation warning for CCharts
1 parent bad370b commit ce3e8f7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/CChart.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,16 @@ const CChartDoughnut = props => <CChart {...props} type="doughnut"/>
138138
const CChartRadar = props => <CChart {...props} type="radar"/>
139139
const CChartPie = props => <CChart {...props} type="pie"/>
140140
const CChartPolarArea = props => <CChart {...props} type="polarArea"/>
141+
const CCharts = props => {
142+
console.warn(
143+
'<CCharts> component has been deprecated. Use <CChart> or <CChart*> instead'
144+
)
145+
return <CChart {...props}/>
146+
}
141147

142148
export {
143149
CChart,
150+
CCharts,
144151
CChartBar,
145152
CChartHorizontalBar,
146153
CChartLine,

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
CChart,
3+
CCharts,
34
CChartBar,
45
CChartHorizontalBar,
56
CChartLine,
@@ -11,6 +12,7 @@ import {
1112

1213
export {
1314
CChart,
15+
CCharts,
1416
CChartBar,
1517
CChartHorizontalBar,
1618
CChartLine,

0 commit comments

Comments
 (0)