mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
522 B
TypeScript
19 lines
522 B
TypeScript
import { Collapse } from 'antd';
|
|
import React from 'react';
|
|
|
|
interface CollapseViewProps extends React.PropsWithChildren {
|
|
title: string;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
}
|
|
export const CollapseView: React.FC<CollapseViewProps> = React.memo((props) => {
|
|
return (
|
|
<Collapse className={props.className} style={props.style}>
|
|
<Collapse.Panel header={props.title} key="main">
|
|
{props.children}
|
|
</Collapse.Panel>
|
|
</Collapse>
|
|
);
|
|
});
|
|
CollapseView.displayName = 'CollapseView';
|