Skip to content

Commit 64cc9a8

Browse files
committedOct 24, 2024
add new styles to test parameters
1 parent 2cf9007 commit 64cc9a8

File tree

4 files changed

+59
-43
lines changed

4 files changed

+59
-43
lines changed
 

‎src/CentileChart/CentileChart.tsx

+21-21
Original file line numberDiff line numberDiff line change
@@ -920,13 +920,13 @@ function CentileChart({
920920
{
921921
<GradientLabelsButtonWrapper>
922922
<StyledButtonTooltip
923-
backgroundColor={styles.toggleTooltipStyle.backgroundColor}
924-
color={styles.toggleTooltipStyle.color}
925-
fontSize={styles.toggleTooltipStyle.fontSize}
926-
fontFamily={styles.toggleTooltipStyle.fontFamily}
927-
fontWeight={styles.toggleTooltipStyle.fontWeight}
928-
fontStyle={styles.toggleTooltipStyle.fontStyle}
929-
borderRadius={styles.toggleTooltipStyle.borderRadius}
923+
$backgroundColor={styles.toggleTooltipStyle.backgroundColor}
924+
$color={styles.toggleTooltipStyle.color}
925+
$fontSize={styles.toggleTooltipStyle.fontSize}
926+
$fontFamily={styles.toggleTooltipStyle.fontFamily}
927+
$fontWeight={styles.toggleTooltipStyle.fontWeight}
928+
$fontStyle={styles.toggleTooltipStyle.fontStyle}
929+
$borderRadius={styles.toggleTooltipStyle.borderRadius}
930930
>
931931
<StyledGradientLabelsButton
932932
$color={styles.toggleStyle.activeColour}
@@ -954,13 +954,13 @@ function CentileChart({
954954
{ childMeasurements.length > 0 &&
955955
<FullScreenButtonWrapper>
956956
<StyledButtonTooltip
957-
backgroundColor={styles.toggleTooltipStyle.backgroundColor}
958-
color={styles.toggleTooltipStyle.color}
959-
fontSize={styles.toggleTooltipStyle.fontSize}
960-
fontFamily={styles.toggleTooltipStyle.fontFamily}
961-
fontWeight={styles.toggleTooltipStyle.fontWeight}
962-
fontStyle={styles.toggleTooltipStyle.fontStyle}
963-
borderRadius={styles.toggleTooltipStyle.borderRadius}
957+
$backgroundColor={styles.toggleTooltipStyle.backgroundColor}
958+
$color={styles.toggleTooltipStyle.color}
959+
$fontSize={styles.toggleTooltipStyle.fontSize}
960+
$fontFamily={styles.toggleTooltipStyle.fontFamily}
961+
$fontWeight={styles.toggleTooltipStyle.fontWeight}
962+
$fontStyle={styles.toggleTooltipStyle.fontStyle}
963+
$borderRadius={styles.toggleTooltipStyle.borderRadius}
964964
>
965965
<StyledFullScreenButton
966966
onClick={()=> fullScreenPressed()}
@@ -983,13 +983,13 @@ function CentileChart({
983983
{ enableExport && (
984984
<ShareButtonWrapper>
985985
<StyledButtonTooltip
986-
backgroundColor={styles.toggleTooltipStyle.backgroundColor}
987-
color={styles.toggleTooltipStyle.color}
988-
fontSize={styles.toggleTooltipStyle.fontSize}
989-
fontFamily={styles.toggleTooltipStyle.fontFamily}
990-
fontWeight={styles.toggleTooltipStyle.fontWeight}
991-
fontStyle={styles.toggleTooltipStyle.fontStyle}
992-
borderRadius={styles.toggleTooltipStyle.borderRadius}
986+
$backgroundColor={styles.toggleTooltipStyle.backgroundColor}
987+
$color={styles.toggleTooltipStyle.color}
988+
$fontSize={styles.toggleTooltipStyle.fontSize}
989+
$fontFamily={styles.toggleTooltipStyle.fontFamily}
990+
$fontWeight={styles.toggleTooltipStyle.fontWeight}
991+
$fontStyle={styles.toggleTooltipStyle.fontStyle}
992+
$borderRadius={styles.toggleTooltipStyle.borderRadius}
993993
>
994994
<StyledShareButton
995995
$color={styles.toggleStyle.activeColour}

‎src/SDSChart/SDSChart.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -575,13 +575,13 @@ const SDSChart: React.FC<SDSChartProps> = (
575575
{ enableExport ? (
576576
<ShareButtonWrapper>
577577
<StyledButtonTooltip
578-
backgroundColor={styles.toggleTooltipStyle.backgroundColor}
579-
color={styles.toggleTooltipStyle.color}
580-
fontSize={styles.toggleTooltipStyle.fontSize}
581-
fontFamily={styles.toggleTooltipStyle.fontFamily}
582-
fontWeight={styles.toggleTooltipStyle.fontWeight}
583-
fontStyle={styles.toggleTooltipStyle.fontStyle}
584-
borderRadius={styles.toggleTooltipStyle.borderRadius}
578+
$backgroundColor={styles.toggleTooltipStyle.backgroundColor}
579+
$color={styles.toggleTooltipStyle.color}
580+
$fontSize={styles.toggleTooltipStyle.fontSize}
581+
$fontFamily={styles.toggleTooltipStyle.fontFamily}
582+
$fontWeight={styles.toggleTooltipStyle.fontWeight}
583+
$fontStyle={styles.toggleTooltipStyle.fontStyle}
584+
$borderRadius={styles.toggleTooltipStyle.borderRadius}
585585
>
586586
<StyledShareButton
587587
$color={styles.toggleStyle.activeColour}

‎src/SubComponents/StyledButtonTooltip.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import styled from 'styled-components';
22

33
export const StyledButtonTooltip = styled.div<{
4-
backgroundColor?: string,
5-
color?: string,
6-
fontSize?: number,
7-
fontFamily?: string,
8-
fontWeight?: string,
9-
fontStyle?: string,
10-
borderRadius?: string,
4+
$backgroundColor?: string,
5+
$color?: string,
6+
$fontSize?: number,
7+
$fontFamily?: string,
8+
$fontWeight?: string,
9+
$fontStyle?: string,
10+
$borderRadius?: string,
1111
}>`
1212
position: relative;
1313
@@ -17,14 +17,14 @@ export const StyledButtonTooltip = styled.div<{
1717
left: 50%;
1818
transform: translateX(-50%);
1919
display: none;
20-
background-color: ${(props) => props.backgroundColor};
21-
color: ${(props) => props.color};
20+
background-color: ${(props) => props.$backgroundColor};
21+
color: ${(props) => props.$color};
2222
padding: 5px;
23-
border-radius: ${(props) => props.borderRadius}px;
24-
font-size: ${(props) => props.fontSize}px;
25-
font-weight: ${(props) => props.fontWeight};
26-
font-style: ${(props) => props.fontStyle};
27-
font-family: ${(props) => props.fontFamily};
23+
border-radius: ${(props) => props.$borderRadius}px;
24+
font-size: ${(props) => props.$fontSize}px;
25+
font-weight: ${(props) => props.$fontWeight};
26+
font-style: ${(props) => props.$fontStyle};
27+
font-family: ${(props) => props.$fontFamily};
2828
}
2929
3030
&:hover .tooltip {

‎src/testParameters/styles/monochromeStyles.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,22 @@ export const monochromeStyles = {
308308
"fontSize": 14,
309309
"fontWeight": "normal",
310310
"fontStyle": "normal"
311+
},
312+
"toggleTooltipStyle": {
313+
"backgroundColor": "#333",
314+
"color": "#fff",
315+
"fontSize": 14,
316+
"fontFamily": "'Montserrat', Helvetica, Arial, sans-serif;",
317+
"fontWeight": 400,
318+
"fontStyle": "regular",
319+
"borderRadius": 4,
320+
},
321+
"referenceTextStyle": {
322+
"fontSize": 8,
323+
"fontFamily": "Arial",
324+
"color": "#000000",
325+
"fontWeight":200,
326+
"fontStyle": "normal",
311327
}
312328
}
313329

@@ -342,7 +358,7 @@ export const chartObject: ChartStyle = {
342358
"colour": "#000000",
343359
"size": 0.25,
344360
"style": "normal"
345-
}
361+
},
346362
}
347363

348364
export const measurementObjects: MeasurementStyle = {

0 commit comments

Comments
 (0)