diff --git a/frontend/src/Editor/Components/StarRating/index.js b/frontend/src/Editor/Components/StarRating/index.js index 2548b9db47..fe16b5d3a5 100644 --- a/frontend/src/Editor/Components/StarRating/index.js +++ b/frontend/src/Editor/Components/StarRating/index.js @@ -20,6 +20,8 @@ export const StarRating = function StarRating({ const allowHalfStar = component.definition.properties.allowHalfStar.value ?? false; const textColorProperty = component.definition.styles.textColor; const color = textColorProperty ? textColorProperty.value : '#ffb400'; + const labelColorProperty = component.definition.styles.labelColor; + const labelColor = labelColorProperty ? labelColorProperty.value : '#333'; const widgetVisibility = component.definition.styles?.visibility?.value ?? true; const disabledState = component.definition.styles?.disabledState?.value ?? false; @@ -99,7 +101,7 @@ export const StarRating = function StarRating({ style={{ display: parsedWidgetVisibility ? '' : 'none' }} > {/* TODO: Add label color defination property instead of hardcoded color*/} - + {label} {animatedStars.map((props, index) => ( diff --git a/frontend/src/Editor/Components/components.js b/frontend/src/Editor/Components/components.js index e706a73b7e..0055d0e355 100644 --- a/frontend/src/Editor/Components/components.js +++ b/frontend/src/Editor/Components/components.js @@ -1002,6 +1002,7 @@ export const componentTypes = [ }, styles: { textColor: { type: 'color', displayName: 'Star Color' }, + labelColor: { type: 'color', displayName: 'Label Color' }, visibility: { type: 'code', displayName: 'Visibility' }, disabledState: { type: 'code', displayName: 'Disable' }, }, @@ -1024,6 +1025,7 @@ export const componentTypes = [ events: [], styles: { textColor: { value: '#ffb400' }, + labelColor: { value: '#333' }, visibility: { value: '{{true}}' }, disabledState: { value: '{{false}}' }, },