MCPcopy Index your code
hub / github.com/flyfloor/react-component / formatChild

Function formatChild

component/Menu.js:74–85  ·  view source on GitHub ↗
(node, i, {current})

Source from the content-addressed store, hash-verified

72 },
73
74 formatChild(node, i, {current}){
75 let {disabled, index, children} = node.props;
76 const selected = current === index;
77 let className = getClassList(node.props);
78 className.push('_child', '_item');
79 if (selected) className.push('_active');
80 if (disabled) className.push('_disabled');
81 className = className.join(' ');
82 return <div className={className} key={`item-${i}`} onClick={() =>this.handleItemClick(index, disabled)}>
83 {children}
84 </div>;
85 },
86
87 formatSubMenu(node, i, { popped, accordion, mode, current, horizontal, level }) {
88 let {title, index, disabled, active, children} = node.props;

Callers

nothing calls this directly

Calls 1

getClassListFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…