260703_01_FST: First Commit
This commit is contained in:
22
registry/components/layout/KriPageTitle.tsx
Normal file
22
registry/components/layout/KriPageTitle.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
export interface KriPageTitleProps {
|
||||
title: ReactNode
|
||||
description?: ReactNode
|
||||
actions?: ReactNode
|
||||
className?: string
|
||||
titleClassName?: string
|
||||
}
|
||||
|
||||
export function KriPageTitle({ title, description, actions, className, titleClassName }: KriPageTitleProps) {
|
||||
return (
|
||||
<div className={cn('flex items-start justify-between gap-4', className)}>
|
||||
<div className="min-w-0">
|
||||
<h1 className={cn('text-2xl font-bold tracking-tight', titleClassName)}>{title}</h1>
|
||||
{description ? <div className="text-muted-foreground mt-1 text-sm">{description}</div> : null}
|
||||
</div>
|
||||
{actions ? <div className="flex shrink-0 items-center gap-2">{actions}</div> : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user