Skip to content

Commit f94d3e0

Browse files
committed
removed .parcel-cache tracking and deleted them also updated background animation on vetsWhoCode.html react component and fixed class module imports
1 parent dd1645f commit f94d3e0

28 files changed

+25
-26
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ typings/
7474

7575
# parcel-bundler cache (https://parceljs.org/)
7676
.cache
77-
.parcel-cache/
77+
.parcel-cache
7878

7979
# Next.js build output
8080
.next

.parcel-cache/119caa20f5233e16

-348 KB
Binary file not shown.

.parcel-cache/1360e7b616166f45

-2.77 KB
Binary file not shown.

.parcel-cache/192a90629b7c55f9

-113 KB
Binary file not shown.

.parcel-cache/1d11806abf58443d

-199 KB
Binary file not shown.

.parcel-cache/37dbec41244c32ee.txt

-2
This file was deleted.

.parcel-cache/3f5f5ca79c0f493d

-2.89 KB
Binary file not shown.

.parcel-cache/475d26239b57da2e

-2.27 KB
Binary file not shown.

.parcel-cache/50cc2ae478dea361

-2.39 KB
Binary file not shown.

.parcel-cache/51be5f63fae71616

-1.58 KB
Binary file not shown.

.parcel-cache/5ab260c4d4b65e35

-2.07 KB
Binary file not shown.

.parcel-cache/7c901be8e1fcacd1

-189 KB
Binary file not shown.

.parcel-cache/7d971ccda0704aca

-280 KB
Binary file not shown.

.parcel-cache/839725f60ad82a5f

-923 KB
Binary file not shown.

.parcel-cache/8c518a452f6b17ba

-2.32 KB
Binary file not shown.

.parcel-cache/9156721e63065075

-25.7 KB
Binary file not shown.

.parcel-cache/9536454724fb5844

-15.5 KB
Binary file not shown.

.parcel-cache/99a3d488786eb067

-240 KB
Binary file not shown.

.parcel-cache/a0245fedd5d14636

-773 KB
Binary file not shown.

.parcel-cache/a9f5484dda8bfe2c

-83.6 KB
Binary file not shown.

.parcel-cache/ce54f4c5659905de

-252 KB
Binary file not shown.

.parcel-cache/data.mdb

-12.5 MB
Binary file not shown.

.parcel-cache/e624a035dd657bbf

-504 KB
Binary file not shown.

.parcel-cache/lock.mdb

-7.94 KB
Binary file not shown.

src/css/vetswhocode.css

-15
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,6 @@ button.call-out {
9898
margin-bottom: 20px;
9999
}
100100

101-
.react-app.skittles {
102-
background-image: linear-gradient(45deg, #B39DDB, #ED9CD4, #FFA1B8, #FFB493, #FFD474, #F9F871);
103-
background-size: 300%;
104-
overflow: hidden;
105-
animation: bg-animation 3.2s infinite alternate;
106-
}
107-
108101
@keyframes pageLoad {
109102
0% {
110103
transform: translateY(-20);
@@ -117,11 +110,3 @@ button.call-out {
117110
}
118111
}
119112

120-
@keyframes bg-animation {
121-
0% {
122-
background-position: left;
123-
}
124-
100% {
125-
background-position: right;
126-
}
127-
}

src/scripts/react/App.module.css

+16
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,20 @@
99
display: flex;
1010
gap: 20px;
1111
justify-content: center;
12+
}
13+
14+
.app.skittles {
15+
background-image: linear-gradient(45deg, #B39DDB, #ED9CD4, #FFA1B8, #FFB493, #FFD474, #F9F871);
16+
background-size: 300%;
17+
overflow: hidden;
18+
animation: bg-animation 3.2s infinite alternate;
19+
}
20+
21+
@keyframes bg-animation {
22+
0% {
23+
background-position: left;
24+
}
25+
100% {
26+
background-position: right;
27+
}
1228
}

src/scripts/react/App.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React, { useState } from "react";
22
import Button from "./Components/Button";
3-
import classes from "./App.module.css";
3+
import * as classes from "./App.module.css";
44

55
const App = () => {
66
const [currentCount, setCurrentCount] = useState(0);
7-
const divBackground = document.getElementById("react-app");
7+
const [animateBg, setAnimateBg] = useState(false);
88

9-
const addButtonHandler = () => {
10-
setCurrentCount((prevCount) => prevCount+=1);
11-
};
9+
function addButtonHandler() {
10+
setCurrentCount((prevCount) => prevCount += 1);
11+
}
1212

1313
const subtractButtonHandler = () => {
1414
setCurrentCount((prevCount) => (prevCount - 1 <= 0 ? 0 : prevCount-= 1));
@@ -19,11 +19,11 @@ const App = () => {
1919
};
2020

2121
const backgroundColorHandler = () => {
22-
divBackground!.classList.toggle("skittles");
22+
setAnimateBg(prev => !prev);
2323
};
2424

2525
return (
26-
<div className={classes.app}>
26+
<div className={animateBg ? `${classes.app} ${classes.skittles}`: `${classes.app}`}>
2727
<Button
2828
innerText="Tast the rainbow"
2929
onClickHandler={backgroundColorHandler}

src/scripts/react/Components/Button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import classes from "./CSS/Button.module.css";
2+
import * as classes from "./CSS/Button.module.css";
33

44
type ButtonProps = {
55
innerText: string;

0 commit comments

Comments
 (0)