0.0.6 • Published 3 years ago

use-material-ui-spacing v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

use-material-ui-spacing

npm version

Table of Contents

Installing

Using npm:

$ npm install use-material-ui-spacing

Using yarn:

$ yarn add use-material-ui-spacing

Example

note: ES modules usage

In your React component:

import clsx from 'clsx'
import { useSpacing } from 'use-material-ui-spacing'

function Button({ children }) {
  const [px2, py1, mt3, m4] = useSpacing('px2', 'py1', 'mt3', 'm4')

  return <button className={clsx(px2, py1, mt3, m4)}>{children}</button>
}

License

MIT