Skip to content

Commit

Permalink
Merge pull request #342 from Sancharisingh/issue/#328
Browse files Browse the repository at this point in the history
Add animated cursor
  • Loading branch information
Avdhesh-Varshney authored Oct 23, 2024
2 parents de84ff2 + fa24b51 commit bef9219
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dotenv": "^16.4.5",
"groq-sdk": "^0.5.0",
"react": "^18.2.0",
"react-animated-cursor": "^2.11.2",
"react-dom": "^18.2.0",
"react-icons": "^5.2.1",
"react-loader-spinner": "^6.1.6",
Expand Down
3 changes: 3 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
cursor: none;
}
23 changes: 23 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import ContributorDetail from "./pages/contributor/ContributorDetail";
import Login from "./pages/auth/Login";
import SignUp from "./pages/auth/SignUp";
import ChanakyaGpt from "./pages/resources/ChanakyaGpt";
import "./App.css";
import AnimatedCursor from "react-animated-cursor"

function App() {
const { progress, isDarkMode } = useContext(Context); // Assuming isDarkMode is provided in your context
Expand All @@ -32,6 +34,27 @@ function App() {

return (
<div className={`d-flex flex-column ${isDarkMode ? 'dark' : ''}`}>
<AnimatedCursor
innerSize={10}
outerSize={12}
color='111, 158, 111'
outerAlpha={0.8}
innerScale={1.0}
outerScale={5}
clickables={[
'a',
'input[type="text"]',
'input[type="email"]',
'input[type="number"]',
'input[type="submit"]',
'input[type="image"]',
'label[for]',
'select',
'textarea',
'button',
'.link'
]}
/>
<Router>
<Navbar />
<LoadingBar height={3} color="#f11946" progress={progress} />
Expand Down

0 comments on commit bef9219

Please sign in to comment.