@navinc/base-react-components
Version:
Nav's Pattern Library
15 lines • 806 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import IconListContainer from './parts/icon-list-container.js';
import ListItem from './parts/list-item.js';
import IconContainer from './parts/icon-container.js';
import Copy from '../../copy.js';
const IconList = (props) => {
const { data } = props;
if (!data || data.constructor !== Array)
return null;
return (_jsx(IconListContainer, { children: data.map((item, index) => {
return (_jsxs(ListItem, { children: [item.icon && (_jsx(IconContainer, { children: _jsx("img", { src: item.icon, alt: item.icon }) })), _jsxs(Copy, { children: [item.boldCopy && _jsx("strong", { children: item.boldCopy }), " ", item.copy] })] }, index));
}) }));
};
export default IconList;
//# sourceMappingURL=index.js.map