@rcpch/digital-growth-charts-react-component-library
Version:
A React component library for the RCPCH digital growth charts using Rollup, TypeScript and Styled-Components
76 lines (75 loc) • 2.21 kB
TypeScript
export interface ChartStyle {
errorTitleStyle?: TextStyle;
errorSubtitleStyle?: TextStyle;
errorToggleButtonInactiveColour?: string;
errorToggleButtonActiveColour?: string;
errorToggleButtonTextStyle?: TextStyle;
errorToggleButtonSize?: number;
backgroundColour?: string;
titleStyle?: TextStyle;
subTitleStyle?: TextStyle;
tooltipBackgroundColour?: string;
tooltipStroke?: string;
tooltipBorderRadius?: number;
tooltipTextStyle?: TextStyle;
termFill?: string;
termStroke?: string;
toggleButtonInactiveColour?: string;
toggleButtonActiveColour?: string;
toggleButtonTextStyle?: TextStyle;
toggleButtonTooltipStyle?: ToggleButtonTooltipStyle;
toggleButtonSize?: number;
}
export interface MeasurementStyle {
measurementFill?: string;
highlightedMeasurementFill?: string;
eventTextStyle?: TextStyle;
}
export interface CentileStyle {
sdsStroke?: string;
centileStroke?: string;
nondisjunctionThresholdLabel?: string;
nondisjunctionThresholdLine?: string;
delayedPubertyAreaFill?: string;
midParentalCentileStroke?: string;
midParentalAreaFill?: string;
centileTextStyle?: Pick<TextStyle, 'name' | 'size' | 'weight'>;
}
export interface SDSStyle {
heightStroke?: string;
weightStroke?: string;
ofcStroke?: string;
bmiStroke?: string;
}
export interface GridlineStyle {
gridlines?: boolean;
stroke?: string;
strokeWidth?: number;
dashed?: boolean;
}
export interface AxisStyle {
axisStroke?: string;
axisThresholdLabelTextStyle?: TextStyle;
axisThresholdLineStyle?: AxisThresholdLineStyle;
axisLabelTextStyle?: TextStyle;
tickLabelTextStyle?: TickLabelTextStyle;
}
export interface TickLabelTextStyle extends TextStyle {
padding?: number;
}
export interface AxisThresholdLineStyle {
colour?: string;
}
export interface ReferenceStyle extends TextStyle {
}
export interface ToggleButtonTooltipStyle extends TextStyle {
backgroundColour?: string;
borderRadius?: number;
}
export interface TextStyle {
name?: string;
colour?: string;
size?: number;
style?: 'italic' | 'normal';
weight?: number | string;
}