UNPKG

@prosperitainova/dumbo-react-native

Version:
32 lines (30 loc) 929 B
"use strict"; import React from 'react'; import { View } from 'react-native'; import { NavigationListItem } from '../NavigationListItem'; /** Props for NavigationList component */ import { jsx as _jsx } from "react/jsx-runtime"; /** * NavigationList component for rendering a list of navigation items * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/NavigationList.tsx | Example code} */ export class NavigationList extends React.Component { render() { const { items, componentProps, style } = this.props; const allItems = items || []; return /*#__PURE__*/_jsx(View, { style: style, ...(componentProps || {}), children: allItems.map((item, index) => /*#__PURE__*/_jsx(NavigationListItem, { ...item, lastItem: index + 1 === allItems.length }, index)) }); } } //# sourceMappingURL=index.js.map