diff --git a/src/App.js b/src/App.js index 5a6cfc2..ea44fee 100644 --- a/src/App.js +++ b/src/App.js @@ -1,18 +1,34 @@ +import { useState } from 'react'; import './App.css'; import About from './components/About'; import Navbar from './components/Navbar'; import Textform from './components/TextForm'; -import Textform2 from './components/Textform2' ; +import React from 'react' ; + let name = "vishwajit vm" ; function App() { + //dark mode functionality here + const [mode , setMode] = useState('light') ; + + //toggleMode + const toggleMode = ()=>{ + if(mode === 'light') { + setMode("dark") + document.body.style.background = '#042743' + } + else{ + setMode( "light") + document.body.style.background = 'white' + + } + } return ( <> - + {/* */}
- - {/* */} +
); diff --git a/src/components/Navbar.js b/src/components/Navbar.js index be74a2c..af0e07d 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -3,8 +3,8 @@ import PropTypes from 'prop-types' export default function Navbar(props) { - return ( -