@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
9 lines • 1.45 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { ROLES } from '../../types/role/role';
import { LeftBoxShadowContainerStyled, RightBoxShadowContainerStyled, TableScrollableContainerStyled, TableStyled, TableWrapperStyled, } from './table.styled';
const TableStandAloneComponent = ({ dataTestId = 'table', children, styles, hasScrollDisabled, hasScroll, sticky, component, ...props }, ref) => {
return (_jsxs(TableWrapperStyled, { ref: ref, "$styles": styles, "data-sticky": sticky, "data-testid": `${dataTestId}-wrapper`, children: [_jsx(TableScrollableContainerStyled, { "data-table-scrollable-container": true, "$hasScrollDisabled": hasScrollDisabled, "$styles": styles, "aria-hidden": props['aria-hidden'], "aria-label": hasScroll ? props['aria-label'] : undefined, "aria-labelledby": hasScroll ? props['aria-labelledby'] : undefined, "data-testid": `${dataTestId}-scrollable-container`, role: hasScroll ? ROLES.REGION : undefined, tabIndex: hasScroll ? 0 : undefined, children: _jsx(TableStyled, { "$styles": styles, as: component, "data-testid": dataTestId, children: children }) }), _jsx(LeftBoxShadowContainerStyled, { "data-table-left-shadow": true, "$styles": styles }), _jsx(RightBoxShadowContainerStyled, { "data-table-right-shadow": true, "$styles": styles })] }));
};
export const TableStandAlone = React.forwardRef(TableStandAloneComponent);
//# sourceMappingURL=tableStandAlone.js.map