1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.deepForEach = void 0;
|
4 | const react_1 = require("react");
|
5 | function deepForEach(children, fn) {
|
6 | react_1.Children.forEach(children, child => {
|
7 | const element = child;
|
8 | if (element.props && element.props.children && typeof element.props.children === 'object') {
|
9 | deepForEach(element.props.children, fn);
|
10 | }
|
11 | fn(element);
|
12 | });
|
13 | }
|
14 | exports.deepForEach = deepForEach;
|