Class: JsxRosetta::IR::CvaCallSite

Inherits:
Data
  • Object
show all
Includes:
Node
Defined in:
lib/jsx_rosetta/ir/types.rb

Overview

A className attribute value that resolves to a known cva binding’s call shape — ‘className={cn(buttonVariants({ variant, size }), className)}` or the no-cn direct form `className={buttonVariants({ variant })}`. The translator recognizes the AST shape at lowering so the backend never has to regex over verbatim JS source; this naturally handles literal-pinned axes, reversed arg order, and the cn-vs-no-cn forms.

binding_name : String — referenced cva binding’s const name. axes : [CvaAxisPair] — preserved in JSX source order. class_arg : Interpolation | nil — the optional trailing className

arg from `cn(<cvaCall>, <classArg>)`. Nil for the
single-arg `cn(<cvaCall>)` and the no-cn direct
forms.

Instance Attribute Summary collapse

Instance Attribute Details

#axesObject (readonly)

Returns the value of attribute axes

Returns:

  • (Object)

    the current value of axes



214
215
216
# File 'lib/jsx_rosetta/ir/types.rb', line 214

def axes
  @axes
end

#binding_nameObject (readonly)

Returns the value of attribute binding_name

Returns:

  • (Object)

    the current value of binding_name



214
215
216
# File 'lib/jsx_rosetta/ir/types.rb', line 214

def binding_name
  @binding_name
end

#class_argObject (readonly)

Returns the value of attribute class_arg

Returns:

  • (Object)

    the current value of class_arg



214
215
216
# File 'lib/jsx_rosetta/ir/types.rb', line 214

def class_arg
  @class_arg
end