@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
17 lines • 1.96 kB
JavaScript
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { Footer } from '../../../components/footer/footer';
import { ListContainerHeaderPriorityStyled, ListContainerStyled } from '../table.styled';
import { FormatListHeaderPriorityType } from '../types/formatListHeaderPriority';
import { ListColumnHeaderPriority } from './listColumnHeaderPriority';
import { ListRowHeaderPriority } from './listRowHeaderPriority';
import { ListRowPriority } from './listRowPriority';
export const List = ({ formatListHeaderPriority = FormatListHeaderPriorityType.ROW, ...props }) => {
const footerVariant = props.footer?.variant ?? props.styles?.footerVariant;
return (_jsxs(_Fragment, { children: [formatListHeaderPriority === FormatListHeaderPriorityType.ROW && (_jsx(ListContainerStyled, { "data-testid": props.dataTestId, styles: props.styles, children: formatListHeaderPriority === FormatListHeaderPriorityType.ROW &&
props.values.map((value, indexValue) => {
return (_jsx(ListRowPriority, { ...props, index: indexValue, value: value }, indexValue));
}) })), formatListHeaderPriority === FormatListHeaderPriorityType.ROW_HEADER && (_jsx(ListContainerHeaderPriorityStyled, { "data-testid": props.dataTestId, styles: props.styles, children: props.values.map((value, indexValue) => {
return (_jsx(ListRowHeaderPriority, { ...props, index: indexValue, value: value }, indexValue));
}) })), formatListHeaderPriority === FormatListHeaderPriorityType.COLUMN_HEADER && (_jsx(ListContainerHeaderPriorityStyled, { "data-testid": props.dataTestId, styles: props.styles, children: _jsx(ListColumnHeaderPriority, { ...props }) })), props.footer?.content && footerVariant && (_jsx(Footer, { simpleContainer: false, ...props.footer, variant: footerVariant, children: props.footer.content }))] }));
};
//# sourceMappingURL=list.js.map