FigmaBaseAtom

open class FigmaBaseAtom(    val type: AtomType,     val width: Int?,     val height: Int?,     val constraintX: AtomikConstraintX,     val constraintY: AtomikConstraintY) : Atom, FixedSizeAtom, ConstrainedAtom

Represents an Atom with all of the properties found in a Figma atom

This atom contains the components that are configurable in a Figma file. These are the base components, as in Figma you can create shape and text components. There are child classes for those components.

Constructors

Link copied to clipboard
fun FigmaBaseAtom(    type: AtomType,     width: Int?,     height: Int?,     constraintX: AtomikConstraintX,     constraintY: AtomikConstraintY)

Functions

Link copied to clipboard
fun <T : AtomInterface> asAtom(): T?

Checks to see if this Atom implements a certain AtomInterface and if it does returns the interface

Link copied to clipboard
inline fun <T : AtomInterface> subAtom(): T?

Finds a subComponent matching a specified AtomInterface if it exists

Properties

Link copied to clipboard
open override val constraintX: AtomikConstraintX

the constraint in the X Axis (horizontal)

Link copied to clipboard
open override val constraintY: AtomikConstraintY

the constraint in the Y Axis (vertical)

Link copied to clipboard
val hasSubComponents: Boolean

Checks to see if the Atom has any subcomponents. Returns boolean

Link copied to clipboard
open override val height: Int?

the height of the UI (in dp / pt)

Link copied to clipboard
open val subComponents: List<Atom>

the components related to this atom, as mentioned in description

Link copied to clipboard
open override val type: AtomType

the Type of atom being displayed, such as button or text

Link copied to clipboard
open override val width: Int?

the width of the UI (in dp / pt)

Inheritors

Link copied to clipboard
Link copied to clipboard