Skip to content

Commit

Permalink
fix opacity not honoured for 8-hex+alpha for range input component tr…
Browse files Browse the repository at this point in the history
…ack color
  • Loading branch information
sulaymon-tajudeen-hpe committed Dec 12, 2023
1 parent 206a85e commit 6a222de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/components/RangeInput/StyledRangeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const trackColorStyle = (props) => {
else {
defaultTrackColor = getRGBA(
normalizeColor(props.theme.rangeInput.track.color, props.theme),
props.theme.rangeInput.track.opacity || 1,
props.theme.rangeInput.track.opacity || undefined,
);
}

Expand Down Expand Up @@ -105,14 +105,14 @@ const trackColorStyle = (props) => {
const { value, color, opacity } = arrayOfTrackColors[index];
result += `${getRGBA(
normalizeColor(color, props.theme),
opacity || 1,
opacity || undefined,
)} ${valuePercentage}%,`;

if (props.value >= value) {
valuePercentage = ((value - min) / (max - min)) * 100;
result += `${getRGBA(
normalizeColor(color, props.theme),
opacity || 1,
opacity || undefined,
)} ${valuePercentage}%,`;
} else {
result += `${getRGBA(
Expand Down

0 comments on commit 6a222de

Please sign in to comment.