@uplift-ltd/space-between
v3.0.0
Published
space-between
Downloads
6
Readme
@uplift-ltd/space-between
Installation
npm i --save @uplift-ltd/space-between
API
SpaceBetween
A component to add space between items. It works by applying a className to all but the first item.
import { SpaceBetween } from "@uplift-ltd/space-between";
function MyComponent() {
return (
<SpaceBetween className="mt-4">
{someList.map((item) => (
<MyItem key={item.id} {...item} />
))}
</SpaceBetween>
);
}
You can optionally pass a divider to be inserted between items.
<SpaceBetween className="mt-4" divider={<MyDivider />}>
...
</SpaceBetween>