FigmaShapeAtom

class FigmaShapeAtom(    val type: AtomType = AtomType.VIEW,     val subComponents: List<Atom> = emptyList(),     val width: Int? = null,     val height: Int? = null,     val constraintX: AtomikConstraintX,     val constraintY: AtomikConstraintY,     val color: AtomikColor,     val padding: Int? = null,     val paddingHorizontal: Int? = padding,     val paddingVertical: Int? = padding,     val paddingLeft: Int? = paddingHorizontal,     val paddingRight: Int? = paddingHorizontal,     val paddingTop: Int? = paddingVertical,     val paddingBottom: Int? = paddingVertical) : FigmaBaseAtom, ColorAtom, PaddingAtom

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

This atom contains the components that are configurable in a Figma file, for a component that has a shape.

Constructors

Link copied to clipboard
fun FigmaShapeAtom(    type: AtomType = AtomType.VIEW,     subComponents: List<Atom> = emptyList(),     width: Int? = null,     height: Int? = null,     constraintX: AtomikConstraintX,     constraintY: AtomikConstraintY,     color: AtomikColor,     padding: Int? = null,     paddingHorizontal: Int? = padding,     paddingVertical: Int? = padding,     paddingLeft: Int? = paddingHorizontal,     paddingRight: Int? = paddingHorizontal,     paddingTop: Int? = paddingVertical,     paddingBottom: Int? = paddingVertical)

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 color: AtomikColor

the color of the UI.

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? = null

the height of the UI (in dp / pt)

Link copied to clipboard
open override val padding: Int? = null

the horizontal padding of the atom (in dp/pt)

Link copied to clipboard
open override val paddingBottom: Int?

the padding on the bottom of the atom (in dp/pt)

Link copied to clipboard
open override val paddingHorizontal: Int?

the horizontal padding of the atom (in dp/pt)

Link copied to clipboard
open override val paddingLeft: Int?

the padding on the left of the atom (in dp/pt)

Link copied to clipboard
open override val paddingRight: Int?

the padding on the right of the atom (in dp/pt)

Link copied to clipboard
open override val paddingTop: Int?

the padding on the top of the atom (in dp/pt)

Link copied to clipboard
open override val paddingVertical: Int?

the vertical padding of the atom (in dp/pt)

Link copied to clipboard
open override 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? = null

the width of the UI (in dp / pt)