zent
Version:
一套前端设计语言和基于React的实现
35 lines (30 loc) • 621 B
Markdown
order: 3
zh-CN:
title: 关闭标签,支持添加关闭事件
text1: 自定义色彩
text2: 非圆角
text3: 自定义大小
en-US:
title: Support the callback function that is trigger
text1: custom color
text2: rectangle
text3: custom size
```jsx
import { Tag } from 'zent';
const closeCallback = (e) => {
alert("cloase tag")
}
const closeCallback2 = (e) => {
alert("cloase tag2")
}
ReactDOM.render(
<div>
<Tag closable onClose={closeCallback} outline>{i18n.text1}</Tag>
<Tag closable onClose={closeCallback2}>{i18n.text2}</Tag>
<Tag closable>{i18n.text3}</Tag>
</div>
, mountNode
);
```