Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milk-ui/milkui-popup
Popup for milk ui.
https://github.com/milk-ui/milkui-popup
Last synced: 8 days ago
JSON representation
Popup for milk ui.
- Host: GitHub
- URL: https://github.com/milk-ui/milkui-popup
- Owner: milk-ui
- License: mit
- Created: 2017-05-21T06:21:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T15:54:14.000Z (about 7 years ago)
- Last Synced: 2024-10-25T20:08:08.285Z (22 days ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# milkui-popup
[![npm version](https://img.shields.io/npm/v/milkui-popup.svg?style=flat)](https://www.npmjs.com/package/milkui-popup) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](README.md)
[![NPM](https://nodei.co/npm/milkui-popup.png?downloads=true&downloadRank=true)](https://nodei.co/npm/milkui-popup/)
> 在点击控件或者某个区域后,浮出一个气泡菜单来做更多的操作。 如果设置了遮罩层,建议通过点击遮罩层的任一位置,进行退出。
## Overview
![image](https://user-images.githubusercontent.com/11053605/28750107-95a89c06-7511-11e7-8c21-a3a72af99b98.png)
## Example
```js
import Popup from 'milkui-popup';
// popupContent
扫一扫
我的二维码
帮助
```## Properties
| Property | Type | Description | Default |
| -- | -- | -- | -- |
| placement | String | 显示位置 | 'bottomLeft' |
| contentClassName | String | 自定义的 class 类名 | '' |
| adjustable | Boolean | 定位是否自适应 | true |
| maxWidth | Number | 显示内容的最大宽度 | 200 |
| offsetX | Number | 内容区定位后的 x 轴的偏移量 | 0 |
| offsetY | Number | 内容区定位后的 y 轴的偏移量 | 0 |
| content | React node | 显示内容 | '' |
| containerNode | React node | 显示内容的容器 | document.body |## Develop
```bash
cnpm i milk-dev -g # dev toolcnpm install
npm start
```## Links
- [Issues](https://github.com/milk-ui/milkui-popup/issues)