|
| 1 | +import Head from 'next/head' |
| 2 | +import Image from 'next/image' |
| 3 | +import styles from '../styles/Home.module.css' |
| 4 | +import dynamic from 'next/dynamic' |
| 5 | +import { Avatar, Pagination } from '@nextui-org/react' |
| 6 | + |
| 7 | +const CustomCheckbox = dynamic(() => import('../components/Checkbox')) |
| 8 | +const CustomTable = dynamic(() => import('../components/Table')) |
| 9 | +const CustomCollapse = dynamic(() => import('../components/Collapse')) |
| 10 | + |
| 11 | +export default function Home() { |
| 12 | + return ( |
| 13 | + <div className={styles.container}> |
| 14 | + <Head> |
| 15 | + <title>NextUI Example</title> |
| 16 | + <meta name="description" content="Generated by create next app" /> |
| 17 | + <link rel="icon" href="/favicon.ico" /> |
| 18 | + </Head> |
| 19 | + <main className={styles.main}> |
| 20 | + <h1> |
| 21 | + <Avatar text="Hi" color="gradient" textColor={'white'} size={'xl'} /> |
| 22 | + </h1> |
| 23 | + <h1 className={styles.title}> |
| 24 | + Welcome to use <a href="https://nextui.org/">NextUI!</a> |
| 25 | + </h1> |
| 26 | + {/* checkout */} |
| 27 | + <h2>Checkbox:</h2> |
| 28 | + <CustomCheckbox></CustomCheckbox> |
| 29 | + {/* table */} |
| 30 | + <h2>Table:</h2> |
| 31 | + <CustomTable></CustomTable> |
| 32 | + {/* pagination */} |
| 33 | + <h2>Pagination</h2> |
| 34 | + <Pagination total={20} initialPage={1} /> |
| 35 | + {/* collapse */} |
| 36 | + <h2>Collapse</h2> |
| 37 | + <CustomCollapse></CustomCollapse> |
| 38 | + </main> |
| 39 | + <footer className={styles.footer}> |
| 40 | + <a |
| 41 | + href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" |
| 42 | + target="_blank" |
| 43 | + rel="noopener noreferrer" |
| 44 | + > |
| 45 | + Powered by{' '} |
| 46 | + <span className={styles.logo}> |
| 47 | + <Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} /> |
| 48 | + </span> |
| 49 | + </a> |
| 50 | + </footer> |
| 51 | + </div> |
| 52 | + ) |
| 53 | +} |
0 commit comments