UNPKG

@datalayer/core

Version:
20 lines (19 loc) 1.06 kB
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; /* * Copyright (c) 2023-2025 Datalayer, Inc. * Distributed under the terms of the Modified BSD License. */ import { useState } from 'react'; import { Box, Button, PageLayout } from '@primer/react'; import { Dialog } from '@primer/react/experimental'; const DataTableDetails = (props) => { return (_jsx(PageLayout, { containerWidth: "full", padding: "normal", sx: { overflow: 'visible' }, children: _jsx(PageLayout.Content, {}) })); }; export const DataTable = (props) => { const [dialog, setDialog] = useState(false); return (_jsxs(_Fragment, { children: [_jsx(Box, { children: dialog ? _jsx(Dialog, { sx: { width: "100%", height: '100%' }, onClose: e => setDialog(false), children: _jsx(DataTableDetails, { ...props }) }) : _jsx(DataTableDetails, { ...props }) }), _jsx(Box, { children: _jsx(Button, { onClick: e => setDialog(true), children: "Zoom" }) })] })); }; export default DataTable;