mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
21 lines
669 B
TypeScript
21 lines
669 B
TypeScript
import { DetailsHTMLAttributes, FC } from 'react';
|
|
import { GetWidgetLayout } from './GetWidgetLayout';
|
|
|
|
export interface WidgetSlotViewProps extends DetailsHTMLAttributes<HTMLDivElement>
|
|
{
|
|
widgetType: string;
|
|
widgetSlot: number;
|
|
widgetConf: any;
|
|
}
|
|
|
|
export const WidgetSlotView: FC<WidgetSlotViewProps> = props =>
|
|
{
|
|
const { widgetType = null, widgetSlot = 0, widgetConf = null, className= '', ...rest } = props;
|
|
|
|
return (
|
|
<div className={ `widget-slot slot-${ widgetSlot } ${ (className || '') }` } { ...rest }>
|
|
<GetWidgetLayout slot={ widgetSlot } widgetConf={ widgetConf } widgetType={ widgetType } />
|
|
</div>
|
|
);
|
|
};
|