From 5d03156de433633406efef24b4d7c340e612170e Mon Sep 17 00:00:00 2001 From: acash404 Date: Mon, 21 Apr 2025 16:20:42 +0000 Subject: [PATCH 1/2] akash(random-background-color): all set. --- src/App.jsx | 6 ++-- src/components/Hooks/useStateHook/Counter.jsx | 31 +++++++++---------- src/index.css | 1 + src/tryityourself/Akash/FormDetails.jsx | 3 +- src/tryityourself/Akash/RandomBg.jsx | 23 ++++++++++++++ src/tryityourself/Akash/RandomBg.style.css | 6 ++++ 6 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 src/tryityourself/Akash/RandomBg.jsx create mode 100644 src/tryityourself/Akash/RandomBg.style.css diff --git a/src/App.jsx b/src/App.jsx index ecb4117..3b0beaa 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,16 +1,16 @@ // COMPONENTS import Greeting from "./components/Basics/Greeting"; import Counter from "./components/Hooks/useStateHook/Counter"; -//import CounterEffect from "./components/Hooks/useEffectHook/Counter1"; import Form from "./project/Form"; import ThemeToggler from "./project/ThemeToggler"; import HandlingForm from "./components/Hooks/useRefHook/HandlingForm"; // TRY IT YOURSELF COMPONENTS import FormDetails from "./tryityourself/Akash/FormDetails"; +import RandomBg from "./tryityourself/Akash/RandomBg"; const App = () => { - return ; + return ; }; -export default App; \ No newline at end of file +export default App; diff --git a/src/components/Hooks/useStateHook/Counter.jsx b/src/components/Hooks/useStateHook/Counter.jsx index d8f8079..13f5ac2 100644 --- a/src/components/Hooks/useStateHook/Counter.jsx +++ b/src/components/Hooks/useStateHook/Counter.jsx @@ -1,21 +1,20 @@ -import React from 'react' -import { useState } from 'react' +import React from "react"; +import { useState } from "react"; const Counter = () => { - const [count, setCount] = useState(0); - - // let a =0; - // function add (){ - // a =+1; - // console.log(a); - // } - console.log("Component Rendered") + const [count, setCount] = useState(0); + // let a =0; + // function add (){ + // a =+1; + // console.log(a); + // } + console.log("Component Rendered"); return (
- -

{count}

- + +

{count}

+
- ) -} + ); +}; -export default Counter; \ No newline at end of file +export default Counter; diff --git a/src/index.css b/src/index.css index a264fd3..85d8e13 100644 --- a/src/index.css +++ b/src/index.css @@ -1,3 +1,4 @@ @import "tailwindcss"; @import "./components/Hooks/useRefHook/HandlingForm.style.css"; @import "./tryityourself/Akash/FormDetails.style.css"; +@import "./tryityourself/Akash/RandomBg.style.css"; diff --git a/src/tryityourself/Akash/FormDetails.jsx b/src/tryityourself/Akash/FormDetails.jsx index c148a51..e6e057d 100644 --- a/src/tryityourself/Akash/FormDetails.jsx +++ b/src/tryityourself/Akash/FormDetails.jsx @@ -92,7 +92,8 @@ const FormDetails = () => {

- Register! + Register + !