2025-05-31 14:46:26 +03:30
|
|
|
// ... existing imports ...
|
|
|
|
|
import Button from '../components/Button'; // Adjust the import path if necessary
|
|
|
|
|
|
|
|
|
|
async function getData() {
|
|
|
|
|
// Simulate a delay to show server-side data fetching
|
|
|
|
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
|
|
|
return { message: 'This data was fetched on the server!' };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default async function Home() {
|
|
|
|
|
const data = await getData();
|
2025-05-31 13:17:46 +03:30
|
|
|
|
|
|
|
|
return (
|
2025-05-31 14:46:26 +03:30
|
|
|
<main className="flex min-h-screen flex-col items-center justify-between p-24 text-gray-300">
|
|
|
|
|
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
|
|
|
|
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
|
|
|
{data.message}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mt-8 flex gap-4">
|
|
|
|
|
<Button>Default Button</Button>
|
|
|
|
|
<Button disabled>Disabled Button</Button>
|
|
|
|
|
<Button loading>Loading Button</Button>
|
|
|
|
|
<Button endIcon={<span>→</span>}>Button with Icon</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mt-8 flex flex-col gap-4">
|
|
|
|
|
<h3>Standard Buttons:</h3>
|
|
|
|
|
<div className="flex gap-4">
|
|
|
|
|
<Button>Default Button</Button>
|
|
|
|
|
<Button disabled>Disabled Button</Button>
|
|
|
|
|
<Button loading>Loading Button</Button>
|
|
|
|
|
<Button endIcon={<span>→</span>}>Button with Icon</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3>Sized Buttons:</h3>
|
|
|
|
|
<div className="flex gap-4 items-center">
|
|
|
|
|
<Button size="small">Small Button</Button>
|
|
|
|
|
<Button size="medium">Medium Button</Button>
|
|
|
|
|
<Button size="large">Large Button</Button>
|
|
|
|
|
</div>
|
2025-05-31 13:17:46 +03:30
|
|
|
|
2025-05-31 14:46:26 +03:30
|
|
|
<h3>Icon Buttons:</h3>
|
|
|
|
|
<div className="flex gap-4 items-center">
|
|
|
|
|
<Button iconOnly endIcon={<span>←</span>} size="small" />
|
|
|
|
|
<Button iconOnly endIcon={<span>←</span>} size="medium" />
|
|
|
|
|
<Button iconOnly endIcon={<span>←</span>} size="large" />
|
|
|
|
|
<Button iconOnly endIcon={<span>←</span>} disabled size="medium" />
|
|
|
|
|
<Button iconOnly endIcon={<span>←</span>} loading size="medium" />
|
2025-05-31 13:17:46 +03:30
|
|
|
</div>
|
2025-05-31 14:46:26 +03:30
|
|
|
</div>
|
|
|
|
|
</main>
|
2025-05-31 13:17:46 +03:30
|
|
|
);
|
|
|
|
|
}
|