MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / C

Function C

packages/xadmin-ui/src/index.js:4–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import app from 'xadmin'
3
4const C = args => {
5 if(typeof args == 'string') {
6 return app.get('components')[args]
7 } else {
8 const { is, ...props } = args
9 const Component = C(is)
10 if(Component)
11 return <Component {...props} />
12 else
13 return <div>Component {is} not found.</div>
14 }
15}
16
17C.lazy = is => props => C({ is, ...props })
18

Callers 11

renderMethod · 0.90
Pages.jsFile · 0.90
Items.jsFile · 0.90
Pages.jsFile · 0.90
renderMethod · 0.90
BaseFormFunction · 0.90
fieldBuilderFunction · 0.90
index.jsFile · 0.90
relate.jsFile · 0.90
index.jsFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected