💩 create hero UI wrapper

still need fix or downgrade tailwind to v3
This commit is contained in:
2025-07-09 09:58:01 +07:00
parent 5266010976
commit 28d81d9792
8 changed files with 458 additions and 7 deletions

10
app/(home)/button.tsx Normal file
View File

@ -0,0 +1,10 @@
"use client";
import { Button } from "@heroui/react";
import React from "react";
const button = () => {
return <Button color="primary">Button</Button>;
};
export default button;

View File

@ -1,10 +1,18 @@
import Button from "./button";
import { metadata } from "./metadata";
export { metadata };
import React from "react";
const page = () => {
return <div className="text-center text-3xl mt-6">Nounoz TV</div>;
return (
<main>
<div className="text-center text-3xl mt-6">Nounoz TV</div>
<div>
<Button />
</div>
</main>
);
};
export default page;

View File

@ -1 +1,4 @@
@import "tailwindcss";
@plugin './hero.ts';
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *));

2
app/hero.ts Normal file
View File

@ -0,0 +1,2 @@
import { heroui } from "@heroui/react";
export default heroui();

View File

@ -1,12 +1,15 @@
import "./globals.css";
import GeistFontProvider from "@/providers/fonts/GeistFontProvider";
import HeroUIWrapper from "@/providers/HeroUIWrapper";
import React from "react";
const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
return (
<html lang="en" className="dark">
<body>
<GeistFontProvider>{children}</GeistFontProvider>
<GeistFontProvider>
<HeroUIWrapper>{children}</HeroUIWrapper>
</GeistFontProvider>
</body>
</html>
);