/
alt3rmann
/
label-studio
Обзор
Документация
Войти
/
alt3rmann
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
web/libs/editor/src/components/Node/NodeView.ts
21 строка
464 B
Julio Sgarbi
feat: LEAP-452: FE Repo Modernization / Monorepo (#5154)
04 янв 2024, 15:59
Не верифицирован
04 янв 2024, 15:59
ca09b8f
Код
Авторство
О чём код?
interface NodeViewProps { name: string; icon: any; altIcon?: any; getContent?: (node: any) => JSX.Element | null; fullContent?: (node: any) => JSX.Element | null; } export const NodeView = ({ name, icon, altIcon = null, getContent = () => null, fullContent = () => null, }: NodeViewProps) => { if (altIcon instanceof Function) { [getContent, altIcon] = [altIcon, null]; } return { name, icon, altIcon, getContent, fullContent }; };