/react-box-model-getter

A React HOC to get the box model values of the root wrapper

Primary LanguageJavaScriptMIT LicenseMIT

react-box-model-getter

This is a React HOC to get the box model values of the root wrapper.

It takes follwing arguments as comma seperated strings in addition to the component -

  • height
  • width
  • borderWidth
  • borderTopWidth
  • borderBottomWidth
  • borderRightWidth
  • borderLeftWidth
  • padding
  • paddingTop
  • paddingBottom
  • paddingRight
  • paddingLeft
  • margin
  • marginTop
  • marginBottom
  • marginRight
  • marginLeft

Invalid arguments will throw a consol error.

How To Use

Please view this Codepen example