UNPKG

@kiwicom/orbit-components

Version:

<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"

15 lines (13 loc) 518 B
import SPACINGS_AFTER from "./consts"; const getSpacingToken = ({ spaceAfter, theme }) => { const tokens = { [SPACINGS_AFTER.SMALLEST]: theme.orbit.spaceXXSmall, [SPACINGS_AFTER.SMALL]: theme.orbit.spaceXSmall, [SPACINGS_AFTER.NORMAL]: theme.orbit.spaceSmall, [SPACINGS_AFTER.MEDIUM]: theme.orbit.spaceMedium, [SPACINGS_AFTER.LARGE]: theme.orbit.spaceLarge, [SPACINGS_AFTER.LARGEST]: theme.orbit.spaceXLarge }; return spaceAfter && tokens[spaceAfter]; }; export default getSpacingToken;