Class: JsxRosetta::IR::CvaAxisPair

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

Overview

One axis-value pair inside a cva call’s options object. The discriminator ‘kind` tells the backend how to render the value:

:prop_ref — JS identifier referencing a prop (`{ variant }` or
            `{ variant: someProp }`). Backends render as
            `@snake_case` against the receiving Phlex component.
:literal_string  — `{ variant: "default" }` — the literal value
                   is the variant-table key.
:literal_other   — `{ size: 42 }` / `{ active: true }` — Ruby
                   literal passed through to the bracket key.
:literal_nil     — `{ variant: null }` or `undefined`.

Instance Attribute Summary collapse

Instance Attribute Details

#axisObject (readonly)

Returns the value of attribute axis

Returns:

  • (Object)

    the current value of axis



229
230
231
# File 'lib/jsx_rosetta/ir/types.rb', line 229

def axis
  @axis
end

#kindObject (readonly)

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



229
230
231
# File 'lib/jsx_rosetta/ir/types.rb', line 229

def kind
  @kind
end

#sourceObject (readonly)

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



229
230
231
# File 'lib/jsx_rosetta/ir/types.rb', line 229

def source
  @source
end