MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / convertStyleToReactStyles

Function convertStyleToReactStyles

pkg/vdom/vdom_html.go:265–274  ·  view source on GitHub ↗
(styleMap map[string]string, params map[string]any)

Source from the content-addressed store, hash-verified

263}
264
265func convertStyleToReactStyles(styleMap map[string]string, params map[string]any) map[string]any {
266 if len(styleMap) == 0 {
267 return nil
268 }
269 rtn := make(map[string]any)
270 for key, val := range styleMap {
271 rtn[toReactName(key)] = attrToProp(val, false, params)
272 }
273 return rtn
274}
275
276func styleAttrStrToStyleMap(styleText string, params map[string]any) (map[string]any, error) {
277 parser := cssparser.MakeParser(styleText)

Callers 1

styleAttrStrToStyleMapFunction · 0.85

Calls 2

toReactNameFunction · 0.85
attrToPropFunction · 0.85

Tested by

no test coverage detected