Skip to content

Commit 23a13fe

Browse files
committed
update images without transparent pixels
1 parent 9e3c602 commit 23a13fe

8 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎web/profile-pictures/components/Galery.tsx‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ const Gallery: React.FC<GalleryProps> = ({
99
choices,
1010
choiceSelection,
1111
}: GalleryProps): JSX.Element => {
12-
const onClickHandler = (choice: string): void => {
12+
const [selection, setSelection] = useState<string | undefined>(undefined);
13+
14+
const handleClick = (choice: string): void => {
1315
choiceSelection(choice);
16+
setSelection(choice);
1417
};
1518

1619
return (
@@ -21,8 +24,11 @@ const Gallery: React.FC<GalleryProps> = ({
2124
return (
2225
<p
2326
key={index}
27+
style={{
28+
backgroundColor: choice == selection ? '#0062cc' : 'white',
29+
}}
2430
onClick={(): void => {
25-
onClickHandler(choice);
31+
handleClick(choice);
2632
}}
2733
>
2834
<img
-4.19 KB
Loading
-908 Bytes
Loading
-3.38 KB
Loading
-6.1 KB
Loading
-3.02 KB
Loading
-9.72 KB
Loading

‎web/profile-pictures/styles/globals.css‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ button.active {
8585
border-bottom: 1px solid rgb(235, 235, 235);
8686
min-width: 140px;
8787
}
88-
.gallery > p:hover {
89-
color: #fff;
90-
background-color: #0062cc;
91-
}
9288
.gallery > p:last-child {
9389
border-bottom: 0 none;
9490
}

0 commit comments

Comments
 (0)