Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(charts): remove ChartThemeDefinition export from index.ts #2149

Merged
merged 1 commit into from Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,7 +12,7 @@ import {
VictoryAxisProps,
} from 'victory';
import { getTheme } from '../ChartUtils/chart-theme';
import { ChartThemeDefinition } from "../ChartTheme";
import { ChartThemeDefinition } from "../ChartTheme/ChartTheme";

/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
Expand Down
Expand Up @@ -10,7 +10,7 @@ import { Data } from 'victory-core';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { ChartContainer } from '../ChartContainer/ChartContainer';
import { ChartPie, ChartPieProps } from '../ChartPie/ChartPie';
import { ChartThemeDefinition } from "../ChartTheme";
import { ChartThemeDefinition } from "../ChartTheme/ChartTheme";
import { getChartOrigin } from '../ChartUtils/chart-origin';
import { getDonutThresholdDynamicTheme, getDonutThresholdStaticTheme } from '../ChartUtils/chart-theme';

Expand Down
Expand Up @@ -10,7 +10,7 @@ import {
DonutUtilizationStaticTheme
} from './themes/donut-utilization-theme';

export interface ChartThemeDefinition extends VictoryThemeDefinition {
export interface ChartThemeDefinitionInterface extends VictoryThemeDefinition {
area?: any;
axis?: any;
bar?: any;
Expand Down Expand Up @@ -42,13 +42,6 @@ interface ChartThemeVariantInterface {
light: string;
}

export const ChartBaseTheme: ChartThemeDefinition = BaseTheme;
export const ChartDonutUtilizationDynamicTheme: ChartThemeDefinition = DonutUtilizationDynamicTheme;
export const ChartDonutUtilizationStaticTheme: ChartThemeDefinition = DonutUtilizationStaticTheme;
export const ChartDonutTheme: ChartThemeDefinition = DonutTheme;
export const ChartDonutThresholdDynamicTheme: ChartThemeDefinition = DonutThresholdDynamicTheme;
export const ChartDonutThresholdStaticTheme: ChartThemeDefinition = DonutThresholdStaticTheme;

export const ChartThemeColor: ChartThemeColorInterface = {
blue: 'blue',
default: 'blue',
Expand All @@ -62,3 +55,12 @@ export const ChartThemeVariant: ChartThemeVariantInterface = {
default: 'light',
light: 'light'
};

export type ChartThemeDefinition = ChartThemeDefinitionInterface;

export const ChartBaseTheme: ChartThemeDefinition = BaseTheme;
export const ChartDonutUtilizationDynamicTheme: ChartThemeDefinition = DonutUtilizationDynamicTheme;
export const ChartDonutUtilizationStaticTheme: ChartThemeDefinition = DonutUtilizationStaticTheme;
export const ChartDonutTheme: ChartThemeDefinition = DonutTheme;
export const ChartDonutThresholdDynamicTheme: ChartThemeDefinition = DonutThresholdDynamicTheme;
export const ChartDonutThresholdStaticTheme: ChartThemeDefinition = DonutThresholdStaticTheme;
Expand Up @@ -6,6 +6,5 @@ export {
ChartDonutUtilizationDynamicTheme,
ChartDonutUtilizationStaticTheme,
ChartThemeColor,
ChartThemeDefinition,
ChartThemeVariant
} from './ChartTheme';
Expand Up @@ -14,10 +14,10 @@ import {
ChartDonutUtilizationStaticTheme,
ChartDonutThresholdDynamicTheme,
ChartDonutThresholdStaticTheme,
ChartThemeColor,
ChartThemeDefinition,
ChartThemeColor,
ChartThemeVariant
} from '../ChartTheme';
} from '../ChartTheme/ChartTheme';

// Apply custom properties to color and base themes
export const getCustomTheme = (themeColor: string, themeVariant: string,
Expand Down