mirror of https://github.com/status-im/consul.git
10 lines
220 B
JavaScript
10 lines
220 B
JavaScript
|
export default function(owner, key = '-view-registry:main') {
|
||
|
const components = owner.lookup(key);
|
||
|
return function(el) {
|
||
|
const id = el.getAttribute('id');
|
||
|
if (id) {
|
||
|
return components[id];
|
||
|
}
|
||
|
};
|
||
|
}
|