https://github.com/afeiship/react-ant-confirm
Popconfirm quick wrapper.
https://github.com/afeiship/react-ant-confirm
ant confirm pop-confirm react
Last synced: 6 months ago
JSON representation
Popconfirm quick wrapper.
- Host: GitHub
- URL: https://github.com/afeiship/react-ant-confirm
- Owner: afeiship
- License: mit
- Created: 2020-02-18T13:29:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T01:42:35.000Z (over 4 years ago)
- Last Synced: 2025-03-07T18:03:05.066Z (7 months ago)
- Topics: ant, confirm, pop-confirm, react
- Language: JavaScript
- Size: 339 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-ant-confirm
> Popconfirm quick wrapper.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-ant-confirm
```## properties
| Name | Type | Required | Default | Description |
| ---------- | ------ | -------- | -------------------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| title | string | false | '确认执行这个操作?' | PopopConfirm title. |
| type | enum | false | 'link' | Button/link style. |
| childProps | object | false | {} | The children props. |## usage
1. import css
```scss
@import "~@jswork/react-ant-confirm/dist/style.css";// or use sass
@import "~@jswork/react-ant-confirm/dist/style.scss";// customize your styles:
$react-ant-confirm-options: ()
```
2. import js
```js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import { message, Popconfirm } from 'antd';
import ReactAntConfirm from '@jswork/react-ant-confirm';import './assets/style.scss';
class App extends React.Component {
handleClick = () => {
message.success('你执行了 confirm 操作~');
};render() {
return (
删除
取消
完全自定义直接用antd原生的
);
}
}ReactDOM.render(, document.getElementById('app'));
```
## documentation
- https://afeiship.github.io/react-ant-confirm/## license
Code released under [the MIT license](https://github.com/afeiship/react-ant-confirm/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-ant-confirm
[version-url]: https://npmjs.org/package/@jswork/react-ant-confirm[license-image]: https://img.shields.io/npm/l/@jswork/react-ant-confirm
[license-url]: https://github.com/afeiship/react-ant-confirm/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-ant-confirm
[size-url]: https://github.com/afeiship/react-ant-confirm/blob/master/dist/react-ant-confirm.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-ant-confirm
[download-url]: https://www.npmjs.com/package/@jswork/react-ant-confirm