luda
Version:
A library helps to build cross-framework UI components.
9 lines (6 loc) • 401 B
text/coffeescript
import computeStyleInt from '../../css/helpers/compute-style-int.coffee'
export default (el, xAxis) ->
computeStyleInt(el, "border#{if xAxis then 'Left' else 'Top'}Width") \
+ computeStyleInt(el, "padding#{if xAxis then 'Left' else 'Top'}") \
+ computeStyleInt(el, "padding#{if xAxis then 'Right' else 'Bottom'}") \
+ computeStyleInt(el, "border#{if xAxis then 'Right' else 'Bottom'}Width")