components.widgets.Html.HtmlWidget.tsx Maven / Gradle / Ivy
import React from 'react'
import { useSelector } from 'react-redux'
import StandardWidget from '../StandardWidget'
import { WidgetHOC } from '../../../core/widget/WidgetHOC'
import { dataSourceModelByPrefixSelector } from '../../../ducks/datasource/selectors'
import { ModelPrefix } from '../../../core/datasource/const'
import { Html } from './Html'
import { type Props } from './types'
function Widget({
id,
toolbar,
className,
style,
html,
loading,
datasource,
}: Props) {
const datasourceModel = useSelector(dataSourceModelByPrefixSelector(datasource, ModelPrefix.source)) as Array>
const data = Array.isArray(datasourceModel) ? datasourceModel[0] : {} as Record
return (
)
}
export const HtmlWidget = WidgetHOC(Widget)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy