Skip to content

Commit 449ab70

Browse files
committed
refactor: default export is renamed to Chart
BREAKING CHANGE: default export is renamed to Chart
1 parent 30d5c2d commit 449ab70

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @todo Make named export instead of default
2-
export { Chart as default } from './chart';
31
export type { ChartProps } from './types';
2+
export * from './chart';
43
export * from './typedCharts';

stories/Chart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect, useReducer } from 'react';
22
import { InteractionItem } from 'chart.js';
33
import 'chartjs-adapter-date-fns';
4-
import Chart from '../src';
4+
import { Chart } from '../src';
55
import * as multitypeChart from '../sandboxes/chart/multitype/App';
66
import * as eventsChart from '../sandboxes/chart/events/App';
77
import * as data from './Chart.data';

test/chart.test-d.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expectError } from 'tsd';
22
import React from 'react';
33
import { Plugin } from 'chart.js';
4-
import Chart, { Scatter, Doughnut } from '../src';
4+
import { Chart, Scatter, Doughnut } from '../src';
55
import { data as multiTypeData } from '../sandboxes/chart/multitype/App';
66

77
const data = {

test/chart.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { render, cleanup, fireEvent } from '@testing-library/react';
33
import ChartJS from 'chart.js/auto';
4-
import Chart from '../src';
4+
import { Chart } from '../src';
55

66
describe('<Chart />', () => {
77
const data = {

0 commit comments

Comments
 (0)