mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-12 23:27:30 +08:00
27 lines
547 B
TypeScript
27 lines
547 B
TypeScript
import React from 'react';
|
|
|
|
type ListPanelProps = {
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
header?: React.ReactNode;
|
|
};
|
|
|
|
function joinClasses(...values: Array<string | undefined | false>) {
|
|
return values.filter(Boolean).join(' ');
|
|
}
|
|
|
|
const ListPanel: React.FC<ListPanelProps> = ({
|
|
children,
|
|
className,
|
|
header,
|
|
}) => {
|
|
return (
|
|
<div className={joinClasses('brand-card ui-panel rounded-2xl overflow-hidden flex flex-col min-h-0', className)}>
|
|
{header}
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ListPanel;
|