Skip to content

Commit

Permalink
minor style refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
onderonur committed Nov 3, 2024
1 parent c22ddc3 commit 6ce2010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/demo/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Page() {
});

const secondBallRef = useCallback(
(node: React.ElementRef<'div'>) => {
(node: React.ComponentRef<'div'>) => {
secondBallRef1(node);
secondBallRef2(node);
},
Expand All @@ -53,7 +53,7 @@ export default function Page() {
);

const rootCallback = useCallback(
(node: React.ElementRef<'div'>) => {
(node: React.ComponentRef<'div'>) => {
firstBallRootRef(node);
secondBallRootRef1(node);
secondBallRootRef2(node);
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/components/ball.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ type BallProps = {
color: string;
};

export const Ball = forwardRef<React.ElementRef<'div'>, BallProps>(
export const Ball = forwardRef<React.ComponentRef<'div'>, BallProps>(
function Ball({ color }, ref) {
return (
<div
ref={ref}
className="mx-auto mb-12 mt-[110vh] h-24 w-24 rounded-full"
className="mx-auto mb-12 mt-[110vh] size-24 rounded-full"
style={{ backgroundColor: color }}
/>
);
Expand Down

0 comments on commit 6ce2010

Please sign in to comment.