in src/routes/System/Resource/IconModal.js [431:480]
render() {
const { handleCancel, onChooseIcon } = this.props;
const { filterText } = this.state;
return (
<Modal
width={1250}
centered
title={getIntlContent("SHENYU.SYSTEM.ICON")}
visible
onCancel={handleCancel}
footer={[
<Button key="back" onClick={handleCancel}>
{getIntlContent("SHENYU.COMMON.CALCEL")}
</Button>,
]}
>
<Input.Search
allowClear
placeholder={getIntlContent("SHENYU.SYSTEM.ICON.SEARCH")}
style={{ marginBottom: 20 }}
onChange={this.handleSearchTextChange}
/>
<Card className={styles.iconCard}>
{Object.keys(iconMap).map((groupName, index) => {
return (
<Fragment key={index}>
<h4>{getIntlContent(groupName) || groupName}</h4>
<div className={styles.iconList}>
{iconMap[groupName].map((icon) => {
return this.filterSearch(icon, filterText) ? (
<div
key={icon}
onClick={() => {
onChooseIcon(icon);
}}
className={styles.iconContent}
>
<Icon style={{ fontSize: 20 }} type={icon} />
<span>{icon}</span>
</div>
) : null;
})}
</div>
</Fragment>
);
})}
</Card>
</Modal>
);
}