export interface BordersSize extends CSSStyleDeclaration { [ key ] : any ; } export default function getBordersSize ( styles , axis ) { const sideA = axis === 'x' ? 'Left' : 'Top' ; const sideB = sideA === 'Left' ? 'Right' : 'Bottom' ; return parseFloat ( styles [ `border${ sideA }Width` ] ) + parseFloat ( styles [ `border${ sideB }Width` ] ) ; }