Cookbook
Benjy Cui edited this page Feb 23, 2016
·
2 revisions
Feel free to contribute to antd Cookbook by adding a snippet you've found useful.
There is no locale
property on Popconfirm
. So, we have to set button text by okText
and cancelText
, it is inconvenient to re-use locale config for different components. However, we can set properties by spreading attributes, which makes re-use locale config easier.
const locale = {
okText: 'Yes',
cancelText: 'No',
};
<Popconfirm {...locale} title="Are you sure?">
<a href="#">Delete</a>
</Popconfirm>
- Home
- Cookbook
- FAQ
- Template for Bug Report in IE8 9
- Contributing
- Maintaining
- Design