UNPKG

@zenkit/layout

Version:

ZenKit components for impliments layout

24 lines (21 loc) 644 B
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; import * as React from 'react'; import Box from './box'; function GappedItem(props) { const { gap, isFirst, isLast, children } = props, otherProps = _objectWithoutPropertiesLoose(props, ["gap", "isFirst", "isLast", "classes", "children"]); return React.createElement(Box, _extends({ is: "span", position: "relative", display: "inline-block", ml: !isFirst && gap, mr: !isLast && gap }, otherProps), children); } export default GappedItem;