1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-02 22:52:21 +01:00

28 lines
644 B
TypeScript
Raw Normal View History

import { ReactNode } from 'react';
import * as React from 'react';
2022-06-22 13:01:22 +02:00
interface FabPanelProps {
className?: string,
header?: ReactNode,
size?: 'small' | 'normal'
}
/**
* Simple styled panel component
*/
export const FabPanel: React.FC<FabPanelProps> = ({ className, header, size, children }) => {
return (
2023-01-04 18:00:56 +01:00
<div className={`fab-panel ${className || ''} ${!header ? 'no-header' : ''}`}>
{header && <>
2022-06-22 13:01:22 +02:00
<div className={`panel-header ${size}`}>
{header}
</div>
<div className="panel-content">
{children}
</div>
2023-01-04 18:00:56 +01:00
</>}
{!header && <>{ children }</>}
2022-06-22 13:01:22 +02:00
</div>
);
};