Merge branch 't3code/clean-flat-ui-layout'
This commit is contained in:
@@ -6,13 +6,16 @@ type PanelProps = {
|
||||
actions?: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
variant?: 'flat' | 'surface';
|
||||
};
|
||||
|
||||
export function Panel({ title, subtitle, actions, children, className }: PanelProps) {
|
||||
export function Panel({ title, subtitle, actions, children, className, variant = 'flat' }: PanelProps) {
|
||||
return (
|
||||
<section
|
||||
className={cn(
|
||||
'min-w-0 rounded-2xl border border-[color:var(--line-weak)] bg-[color:var(--panel)] p-4 shadow-[0_0_0_1px_rgba(255,255,255,0.03),0_12px_30px_rgba(0,0,0,0.38)] sm:p-5',
|
||||
variant === 'surface'
|
||||
? 'min-w-0 rounded-2xl border border-[color:var(--line-weak)] bg-[color:var(--panel)] p-4 shadow-[0_0_0_1px_rgba(255,255,255,0.03),0_12px_30px_rgba(0,0,0,0.38)] sm:p-5'
|
||||
: 'min-w-0 border-t border-[color:var(--line-weak)] pt-4 sm:pt-5',
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user