mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
14 lines
267 B
TypeScript
14 lines
267 B
TypeScript
import { PanelConfig, PanelDefineParam } from './types';
|
|
|
|
export function definePanel(config: PanelDefineParam): PanelConfig {
|
|
let options: PanelConfig;
|
|
|
|
if (typeof config === 'function') {
|
|
options = config();
|
|
} else {
|
|
options = config;
|
|
}
|
|
|
|
return options;
|
|
}
|