UNPKG

@native-html/table-plugin

Version:

🔠 A WebView-based plugin to render tables in react-native-render-html

29 lines (26 loc) • 858 B
import React from 'react'; import { defaultHTMLElementModels, HTMLContentModel } from 'react-native-render-html'; import useHtmlTableProps from './useHtmlTableProps'; import { HTMLTable } from './HTMLTable'; /** * The renderer component for the table element. This renderer is fully * scalable, and will adjust to `contentWidth` and `computeEmbeddedMaxWidth`. * It also features `onLinkPress`. * * @public */ const TableRenderer = function TableRenderer(props) { const tableProps = useHtmlTableProps(props); return /*#__PURE__*/React.createElement(HTMLTable, tableProps); }; /** * The model to attach to custom table renderers. * * @public */ export const tableModel = defaultHTMLElementModels.table.extend({ contentModel: HTMLContentModel.block, isOpaque: true }); export default TableRenderer; //# sourceMappingURL=TableRenderer.js.map