UNPKG

@atlaskit/navigation-system

Version:

The latest navigation system for Atlassian apps.

32 lines (31 loc) • 1.4 kB
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["style", "xcss", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd"]; /** * Props from primitives that we explicitly ignore and remove from spread props, * because they apply styles. * * `css` / `className` are not here because primitives don't support them. * * See `packages/design-system/primitives/src/components/anchor.tsx` and `packages/design-system/primitives/src/components/pressable.tsx` * for where these are defined. These shouldn't change very often as the direction is `xcss` over individual props. */ /** * Returns the spread props to pass through to underlying primitive components. * * It removes the props which apply styles. */ // eslint-disable no-unused-vars export function getPrimitiveSpreadProps(_ref) { var style = _ref.style, xcss = _ref.xcss, backgroundColor = _ref.backgroundColor, padding = _ref.padding, paddingBlock = _ref.paddingBlock, paddingBlockStart = _ref.paddingBlockStart, paddingBlockEnd = _ref.paddingBlockEnd, paddingInline = _ref.paddingInline, paddingInlineStart = _ref.paddingInlineStart, paddingInlineEnd = _ref.paddingInlineEnd, props = _objectWithoutProperties(_ref, _excluded); return props; }