Compare commits

..

No commits in common. "c08bcd69b3e70a543b8430bc247bafb18e0ad256" and "d0b92e6a495bfc5ddbbaabdcc0b5d83cb78e1866" have entirely different histories.

3 changed files with 13 additions and 17 deletions

View file

@ -8,7 +8,7 @@ type Props = {
const Avatar = ({ name, picture }: Props) => { const Avatar = ({ name, picture }: Props) => {
return ( return (
<div className="flex items-center"> <div className="flex items-center">
<Image src={picture} className="rounded-full mr-4" alt={name} width={48} height={48} /> <Image src={picture} className="w-12 h-12 rounded-full mr-4" alt={name} />
<div className="text-xl font-bold">{name}</div> <div className="text-xl font-bold">{name}</div>
</div> </div>
); );

View file

@ -43,11 +43,9 @@ export function CursorProvider ({ hidden, enabled, children }) {
}; };
}, []); }, []);
const isTouchDevice = "ontouchstart" in window;
useEffect(() => { useEffect(() => {
const htmlElement = document.documentElement; const htmlElement = document.documentElement;
if (isCursorEnabled & !isTouchDevice) { if (isCursorEnabled) {
htmlElement.classList.add('custom-cursor-enabled-env'); htmlElement.classList.add('custom-cursor-enabled-env');
} else { } else {
htmlElement.classList.remove('custom-cursor-enabled-env'); htmlElement.classList.remove('custom-cursor-enabled-env');
@ -57,7 +55,7 @@ export function CursorProvider ({ hidden, enabled, children }) {
return ( return (
<> <>
<CursorContext.Provider value={{isCustomCursorHidden: isCursorHidden, isCustomCursorEnabled: isCursorEnabled, toggleCursor, toggleCursorEnabled}}> <CursorContext.Provider value={{isCustomCursorHidden: isCursorHidden, isCustomCursorEnabled: isCursorEnabled, toggleCursor, toggleCursorEnabled}}>
{isCursorEnabled & !isTouchDevice ? {isCursorEnabled ?
<div <div
ref={cursorRef} ref={cursorRef}
className={`pointer-events-none fixed top-0 left-0 ${isCursorHidden || !isCursorEnabled || !isCursorInViewport ? 'invisible' : ''} w-10 h-10 bg-white rounded-full z-50 mix-blend-difference`} className={`pointer-events-none fixed top-0 left-0 ${isCursorHidden || !isCursorEnabled || !isCursorInViewport ? 'invisible' : ''} w-10 h-10 bg-white rounded-full z-50 mix-blend-difference`}

View file

@ -1,17 +1,15 @@
"use client"; "use client";
import { cn } from "@/lib/utils";
import React from "react"; import React from "react";
export interface Props { export interface Props {
children?: React.ReactNode; children?: React.ReactNode;
className?: String;
} }
export class H1 extends React.Component<Props> { export class H1 extends React.Component<Props> {
render() { render() {
return ( return (
<h1 className={cn("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", this.props.className)}> <h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl">
{this.props.children} {this.props.children}
</h1> </h1>
); );
@ -21,7 +19,7 @@ export class H1 extends React.Component<Props> {
export class H2 extends React.Component<Props> { export class H2 extends React.Component<Props> {
render() { render() {
return ( return (
<h2 className={cn("scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", this.props.className)}> <h2 className="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0">
{this.props.children} {this.props.children}
</h2> </h2>
); );
@ -31,7 +29,7 @@ export class H2 extends React.Component<Props> {
export class H3 extends React.Component<Props> { export class H3 extends React.Component<Props> {
render() { render() {
return ( return (
<h3 className={cn("scroll-m-20 text-2xl font-semibold tracking-tight", this.props.className)}> <h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
{this.props.children} {this.props.children}
</h3> </h3>
); );
@ -41,7 +39,7 @@ export class H3 extends React.Component<Props> {
export class H4 extends React.Component<Props> { export class H4 extends React.Component<Props> {
render() { render() {
return ( return (
<h4 className={cn("scroll-m-20 text-xl font-semibold tracking-tight", this.props.className)}> <h4 className="scroll-m-20 text-xl font-semibold tracking-tight">
{this.props.children} {this.props.children}
</h4> </h4>
); );
@ -51,7 +49,7 @@ export class H4 extends React.Component<Props> {
export class P extends React.Component<Props> { export class P extends React.Component<Props> {
render() { render() {
return ( return (
<p className={cn("leading-7 [&:not(:first-child)]:mt-6", this.props.className)}> <p className="leading-7 [&:not(:first-child)]:mt-6">
{this.props.children} {this.props.children}
</p> </p>
); );
@ -61,7 +59,7 @@ export class P extends React.Component<Props> {
export class Blockquote extends React.Component<Props> { export class Blockquote extends React.Component<Props> {
render() { render() {
return ( return (
<blockquote className={cn("mt-6 border-l-2 pl-6 italic", this.props.className)}> <blockquote className="mt-6 border-l-2 pl-6 italic">
{this.props.children} {this.props.children}
</blockquote> </blockquote>
); );
@ -71,7 +69,7 @@ export class Blockquote extends React.Component<Props> {
export class Table extends React.Component<Props> { export class Table extends React.Component<Props> {
render() { render() {
return ( return (
<div className={cn("my-6 w-full overflow-y-auto", this.props.className)}> <div className="my-6 w-full overflow-y-auto">
<table className="w-full"> <table className="w-full">
{this.props.children} {this.props.children}
</table> </table>
@ -93,7 +91,7 @@ export class TableHead extends React.Component<Props> {
export class Tr extends React.Component<Props> { export class Tr extends React.Component<Props> {
render() { render() {
return ( return (
<tr className={cn("m-0 border-t p-0 even:bg-muted", this.props.className)}> <tr className="m-0 border-t p-0 even:bg-muted">
{this.props.children} {this.props.children}
</tr> </tr>
); );
@ -103,7 +101,7 @@ export class Tr extends React.Component<Props> {
export class Th extends React.Component<Props> { export class Th extends React.Component<Props> {
render() { render() {
return ( return (
<th className={cn("border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right", this.props.className)}> <th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
{this.props.children} {this.props.children}
</th> </th>
); );
@ -113,7 +111,7 @@ export class Th extends React.Component<Props> {
export class Td extends React.Component<Props> { export class Td extends React.Component<Props> {
render() { render() {
return ( return (
<td className={cn("border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right", this.props.className)}> <td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
{this.props.children} {this.props.children}
</td> </td>
); );