@navinc/base-react-components
Version:
Nav's Pattern Library
15 lines • 834 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import IconListContainer from './parts/icon-list-container';
import ListItem from './parts/list-item';
import IconContainer from './parts/icon-container';
import Copy from '../../copy';
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 }, void 0) }, void 0)), _jsxs(Copy, { children: [item.boldCopy && _jsx("strong", { children: item.boldCopy }, void 0), " ", item.copy] }, void 0)] }, index));
}) }, void 0));
};
export default IconList;
//# sourceMappingURL=index.js.map