Skip to content

Commit

Permalink
Merge pull request #47 from fs-mar24-codemafia/fix/emphasize-selected…
Browse files Browse the repository at this point in the history
…-color

add emphasizing selected color
  • Loading branch information
denyssheremeta authored Jun 14, 2024
2 parents f3a932d + 0d17561 commit e3d5943
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/components/ProductDetails/ProductDetails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@

@include hover(border, 2px solid var(--color-icons));
@include active(border, 2px solid var(--color-primary));

&--active {
outline: 2px solid var(--color-secondary);
cursor: auto;
pointer-events: none;
}
}

&__available-capacity {
Expand All @@ -152,6 +158,8 @@
color: var(--color-white);
border: 1px solid var(--color-primary);
background-color: var(--color-primary);
pointer-events: none;
cursor: auto;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductDetails/ProductDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const ProductDetails: React.FC<Props> = ({
key={color}
style={{ backgroundColor: colorHexMap[color] }}
className={cn('short-params__available-color', {
'short-params__available-color--active': false,
'short-params__available-color--active': color === productDetailed.color,
})}
onClick={() => updateColor(color)}
></p>
Expand Down

0 comments on commit e3d5943

Please sign in to comment.