({ initialDatas, name })
| 18 | import jsonToXML from './helpers/jsonToXML' |
| 19 | |
| 20 | export function initComponent({ initialDatas, name }) { |
| 21 | const Component = initialDatas.context.components[name] |
| 22 | |
| 23 | if (Component) { |
| 24 | const component = new Component(initialDatas) |
| 25 | |
| 26 | if (component.headStyle) { |
| 27 | component.context.addHeadStyle(name, component.headStyle) |
| 28 | } |
| 29 | if (component.componentHeadStyle) { |
| 30 | component.context.addComponentHeadSyle(component.componentHeadStyle) |
| 31 | } |
| 32 | |
| 33 | return component |
| 34 | } |
| 35 | |
| 36 | return null |
| 37 | } |
| 38 | |
| 39 | class Component { |
| 40 | static getTagName() { |
no outgoing calls
no test coverage detected
searching dependent graphs…