# react-material-popover

> Made with create-react-library

Latest version **1.0.4** (published 2021-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-material-popover
pnpm add react-material-popover
yarn add react-material-popover
bun add react-material-popover
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-03-11 |
| First published | 2021-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | InterviewCandies |
| Maintainers | thangvo |

## Links

- npm: https://www.npmjs.com/package/react-material-popover
- Repository: https://github.com/InterviewCandies/react-material-popover
- npm.io page: https://npm.io/package/react-material-popover

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.11.3

## Recent versions

- 1.0.4 (latest) — 2021-03-11
- 1.0.3 — 2021-03-11
- 1.0.2 — 2021-03-11
- 1.0.1 — 2021-03-11
- 1.0.0 — 2021-03-11

## README

# react-material-popover

> A simple material-ui popover using ref instead of state

[![NPM](https://img.shields.io/npm/v/react-material-popover.svg)](https://www.npmjs.com/package/react-material-popover) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-material-popover
```

```bash
yarn add react-material-popover
```

## Usage

```jsx
import React, { useRef } from 'react'
import MaterialPopover from 'react-material-popover'

const Content = ({ closePopover }) => {
  return (
    <button onClick={closePopover} style={{ padding: '2rem' }}>
      Close
    </button>
  )
}
const App = () => {
  const ref = useRef(null)
  return (
    <>
      <button ref={ref}>test</button>
      <MaterialPopover
        ref={ref}
        paper={{ borderRadius: '5px' }}
        anchorOrigin={{
          vertical: 'bottom',
          horizontal: 'left'
        }}
        transformOrigin={{
          vertical: 'top',
          horizontal: 'left'
        }}
      >
        <Content></Content>
      </MaterialPopover>
    </>
  )
}
```

## License

MIT © [InterviewCandies](https://github.com/InterviewCandies)

---
_Source: https://npm.io/package/react-material-popover · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
