feat: add Card and Carousel components; integrate them into NewsPage layout with Newsletter

This commit is contained in:
Ardeman 2025-02-03 18:48:49 +08:00
parent 35b7e86687
commit aaf7269b44
4 changed files with 34 additions and 2 deletions

View File

@ -0,0 +1,15 @@
import type { ComponentProps, FC, PropsWithChildren } from 'react'
type TProperties = PropsWithChildren<ComponentProps<'div'>>
export const Card: FC<TProperties> = (properties) => {
const { children, ...rest } = properties
return (
<div
className="border-[.2px] border-black bg-white p-[30px]"
{...rest}
>
{children}
</div>
)
}

View File

@ -0,0 +1,3 @@
export const Carousel = () => {
return <div>Carousel</div>
}

View File

@ -1,7 +1,18 @@
import { Card } from '~/components/ui/card'
import { Carousel } from '~/components/ui/carousel'
import { Newsletter } from './newsletter'
export const NewsPage = () => {
return (
<div className="border-[.2px] border-black bg-white p-[30px]">
<div>News</div>
<div className="relative">
<Card>
<Carousel />
</Card>
<Newsletter />
<Card>
<Carousel />
</Card>
</div>
)
}

View File

@ -0,0 +1,3 @@
export const Newsletter = () => {
return <div>Newsletter</div>
}