diff --git a/custom/react/Countdown.tsx b/custom/react/Countdown.tsx new file mode 100644 index 0000000..89c881e --- /dev/null +++ b/custom/react/Countdown.tsx @@ -0,0 +1,3 @@ +import Countdown from "./components/Countdown"; + +export default Countdown; diff --git a/custom/react/TwoCountdown.tsx b/custom/react/TwoCountdown.tsx new file mode 100644 index 0000000..d1648c7 --- /dev/null +++ b/custom/react/TwoCountdown.tsx @@ -0,0 +1,3 @@ +import TwoCountdown from "./components/TwoCountdown/indexTwo"; + +export default TwoCountdown; diff --git a/custom/react/components/Countdown/assets/clock.svg b/custom/react/components/Countdown/assets/clock.svg new file mode 100644 index 0000000..0bcc64f --- /dev/null +++ b/custom/react/components/Countdown/assets/clock.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/custom/react/components/Countdown/assets/textura.jpg b/custom/react/components/Countdown/assets/textura.jpg new file mode 100644 index 0000000..261682d Binary files /dev/null and b/custom/react/components/Countdown/assets/textura.jpg differ diff --git a/custom/react/components/Countdown/index.tsx b/custom/react/components/Countdown/index.tsx new file mode 100644 index 0000000..f604a22 --- /dev/null +++ b/custom/react/components/Countdown/index.tsx @@ -0,0 +1,108 @@ +import React, { useEffect, useState } from "react"; + +import styles from "./styles.css"; + +import clock from "./assets/clock.svg"; + +interface CountdownProps { + //formato: dd/mm/yyyy/hh:mm + endDate: string; +} + +interface Time { + hour: number; + minute: number; + second: number; +} + +const Countdown = ({endDate}: CountdownProps) => { + + const [time, setTime] = useState