ksharifbd / react-box-model-getter

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:MIT License


Languages

Language:JavaScript 100.0%