mirror of
https://github.com/supabase/supabase.git
synced 2026-07-01 03:24:26 +08:00
## Problem Now that we migrated old components to their new shadcn alternatives, we don't need the `_Shadcn_` suffix anymore. ## Solution Remove it <img width="659" height="609" alt="image" src="https://github.com/user-attachments/assets/2d7271a9-066a-4dcc-92fe-729b106d2c2f" />
36 lines
954 B
TypeScript
36 lines
954 B
TypeScript
'use client'
|
|
|
|
import { Triangle } from 'lucide-react'
|
|
import type { PropsWithChildren } from 'react'
|
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from 'ui'
|
|
|
|
type BlogCollapsibleProps = PropsWithChildren<{
|
|
title: string
|
|
containerClassName?: string
|
|
}>
|
|
|
|
const BlogCollapsible = ({ title, containerClassName, ...props }: BlogCollapsibleProps) => {
|
|
return (
|
|
<Collapsible className={containerClassName}>
|
|
<CollapsibleTrigger
|
|
className="
|
|
data-[state=open]:text
|
|
hover:text-foreground-light
|
|
flex items-center gap-3
|
|
[&>svg]:fill-current
|
|
[&>svg]:rotate-90
|
|
[&>svg]:transition-transform
|
|
[&>svg]:data-[state='open']:rotate-180
|
|
[&>svg]:data-[state='open']:text
|
|
"
|
|
>
|
|
<Triangle size={10} />
|
|
<span>{title}</span>
|
|
</CollapsibleTrigger>
|
|
<CollapsibleContent {...props} />
|
|
</Collapsible>
|
|
)
|
|
}
|
|
|
|
export default BlogCollapsible
|