first commit
This commit is contained in:
31
frontend/node_modules/antd/es/table/ExpandIcon.js
generated
vendored
Normal file
31
frontend/node_modules/antd/es/table/ExpandIcon.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
"use client";
|
||||
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
function renderExpandIcon(locale) {
|
||||
return props => {
|
||||
const {
|
||||
prefixCls,
|
||||
onExpand,
|
||||
record,
|
||||
expanded,
|
||||
expandable
|
||||
} = props;
|
||||
const iconPrefix = `${prefixCls}-row-expand-icon`;
|
||||
return /*#__PURE__*/React.createElement("button", {
|
||||
type: "button",
|
||||
onClick: e => {
|
||||
onExpand(record, e);
|
||||
e.stopPropagation();
|
||||
},
|
||||
className: classNames(iconPrefix, {
|
||||
[`${iconPrefix}-spaced`]: !expandable,
|
||||
[`${iconPrefix}-expanded`]: expandable && expanded,
|
||||
[`${iconPrefix}-collapsed`]: expandable && !expanded
|
||||
}),
|
||||
"aria-label": expanded ? locale.collapse : locale.expand,
|
||||
"aria-expanded": expanded
|
||||
});
|
||||
};
|
||||
}
|
||||
export default renderExpandIcon;
|
||||
Reference in New Issue
Block a user