2025-05-19 11:04:40 +08:00
|
|
|
import {ReactNode} from 'react'
|
|
|
|
|
import {merge} from '@/lib/utils'
|
2025-05-22 14:59:22 +08:00
|
|
|
import {Tabs, TabsContent, TabsList, TabsTrigger} from '@/components/ui/tabs'
|
|
|
|
|
import LongForm from '@/components/composites/purchase/long/form'
|
|
|
|
|
import ShortForm from '@/components/composites/purchase/short/form'
|
2025-04-08 11:21:58 +08:00
|
|
|
|
|
|
|
|
export type PurchaseProps = {}
|
|
|
|
|
|
|
|
|
|
export default async function Purchase(props: PurchaseProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col gap-4">
|
2025-06-07 11:49:57 +08:00
|
|
|
<Tabs defaultValue="short" className="gap-4">
|
2025-06-10 09:31:05 +08:00
|
|
|
<TabsList className="w-full p-2 bg-white rounded-lg justify-start md:justify-center overflow-auto">
|
2025-06-07 11:49:57 +08:00
|
|
|
<Tab value="short">短效动态</Tab>
|
|
|
|
|
<Tab value="long">长效静态</Tab>
|
|
|
|
|
<Tab value="fixed">固定套餐</Tab>
|
|
|
|
|
<Tab value="custom">定制套餐</Tab>
|
2025-05-19 11:04:40 +08:00
|
|
|
</TabsList>
|
2025-06-07 11:49:57 +08:00
|
|
|
<TabsContent value="short">
|
2025-05-22 14:59:22 +08:00
|
|
|
<ShortForm/>
|
2025-05-19 11:04:40 +08:00
|
|
|
</TabsContent>
|
2025-06-07 11:49:57 +08:00
|
|
|
<TabsContent value="long">
|
2025-05-22 14:59:22 +08:00
|
|
|
<LongForm/>
|
2025-05-19 11:04:40 +08:00
|
|
|
</TabsContent>
|
|
|
|
|
</Tabs>
|
2025-04-08 11:21:58 +08:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-19 11:04:40 +08:00
|
|
|
function Tab(props: {
|
|
|
|
|
value: string
|
|
|
|
|
children: ReactNode
|
|
|
|
|
}) {
|
|
|
|
|
return (
|
2025-06-07 11:49:57 +08:00
|
|
|
<TabsTrigger
|
|
|
|
|
className={merge(
|
|
|
|
|
`w-36 h-12 text-base font-normal flex-none`,
|
|
|
|
|
`data-[state=active]:text-primary data-[state=active]:bg-primary-muted`,
|
|
|
|
|
)}
|
|
|
|
|
value={props.value}>
|
2025-05-19 11:04:40 +08:00
|
|
|
{props.children}
|
|
|
|
|
</TabsTrigger>
|
|
|
|
|
)
|
|
|
|
|
}
|