Browse Source
chore: setupDynamicGradient->setupCursorTracking
pull/2/head
Failed to extract signature
2 changed files with
3 additions and
3 deletions
-
src/components/Exp/Content.tsx
-
src/util/index.ts
|
@ -1,6 +1,6 @@ |
|
|
import { css } from "@emotion/css"; |
|
|
import { css } from "@emotion/css"; |
|
|
import React from "react"; |
|
|
import React from "react"; |
|
|
import { setupDynamicGradient } from "../../util"; |
|
|
import { setupCursorTracking } from "../../util"; |
|
|
import { Experience } from "./types"; |
|
|
import { Experience } from "./types"; |
|
|
|
|
|
|
|
|
const Circle: React.FC = () => ( |
|
|
const Circle: React.FC = () => ( |
|
@ -87,7 +87,7 @@ export const Content = ({ |
|
|
location, |
|
|
location, |
|
|
}: Experience) => { |
|
|
}: Experience) => { |
|
|
return ( |
|
|
return ( |
|
|
<button className={btn} onClick={onClick} ref={setupDynamicGradient}> |
|
|
<button className={btn} onClick={onClick} ref={setupCursorTracking}> |
|
|
<div className="dynamic-gradient" /> |
|
|
<div className="dynamic-gradient" /> |
|
|
<Circle /> |
|
|
<Circle /> |
|
|
<h4> |
|
|
<h4> |
|
|
|
@ -58,7 +58,7 @@ export const get = { |
|
|
|
|
|
|
|
|
import "./dynamic-gradient.css"; |
|
|
import "./dynamic-gradient.css"; |
|
|
|
|
|
|
|
|
export function setupDynamicGradient(el: HTMLElement | null) { |
|
|
export function setupCursorTracking(el: HTMLElement | null) { |
|
|
if (!el) return; |
|
|
if (!el) return; |
|
|
|
|
|
|
|
|
el.addEventListener("mousemove", e => { |
|
|
el.addEventListener("mousemove", e => { |
|
|