grommet
Version:
focus on the essential experience
34 lines • 836 B
JavaScript
import React from 'react';
import { Box, InfiniteScroll, Text } from 'grommet';
var allItems = Array(240).fill().map(function (_, i) {
return "item " + (i + 1);
});
export var Replace = function Replace() {
return (
/*#__PURE__*/
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={...}>
React.createElement(InfiniteScroll, {
items: allItems,
replace: true
}, function (item) {
return /*#__PURE__*/React.createElement(Box, {
key: item,
pad: "medium",
border: {
side: 'bottom'
},
align: "center"
}, /*#__PURE__*/React.createElement(Text, null, item));
})
// </Grommet>
);
};
Replace.parameters = {
chromatic: {
disable: true
}
};
export default {
title: 'Utilities/InfiniteScroll/Replace'
};