MCPcopy Create free account
hub / github.com/callstack/linaria / value

Method value

packages/react/src/processors/styled.ts:277–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275 }
276
277 public override get value(): ObjectExpression {
278 const t = this.astService;
279 const extendsNode =
280 typeof this.component === 'string' || this.component.nonLinaria
281 ? null
282 : this.component.node.name;
283
284 return t.objectExpression([
285 t.objectProperty(
286 t.stringLiteral('displayName'),
287 t.stringLiteral(this.displayName)
288 ),
289 t.objectProperty(
290 t.stringLiteral('__wyw_meta'),
291 t.objectExpression([
292 t.objectProperty(
293 t.stringLiteral('className'),
294 t.stringLiteral(this.className)
295 ),
296 t.objectProperty(
297 t.stringLiteral('extends'),
298 extendsNode
299 ? t.callExpression(t.identifier(extendsNode), [])
300 : t.nullLiteral()
301 ),
302 ])
303 ),
304 ]);
305 }
306
307 protected get tagExpression(): CallExpression {
308 const t = this.astService;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected