UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

14 lines 872 B
import * as React from 'react'; import { RecordContextProvider } from "../controller/record/index.js"; import { WithListContext } from "../controller/list/WithListContext.js"; export const SimpleList = ({ children, render, inline = false, }) => (React.createElement(WithListContext, { render: ({ data, isPending }) => isPending ? null : children ? (children) : (React.createElement("ul", { style: { display: 'flex', flexDirection: inline ? 'row' : 'column', gap: '1em', listStyle: 'none', marginBlockStart: 0, marginBlockEnd: 0, paddingInlineStart: 0, } }, data?.map(record => (React.createElement(RecordContextProvider, { key: record.id, value: record }, React.createElement("li", null, render ? render(record) : children)))))) })); //# sourceMappingURL=SimpleList.js.map