Atom

abstract class Atom

Represents an Atom from Atomic Design, as a class https://atomicdesign.bradfrost.com/

An abstract class that represents an Atom. While interfaces are used to specify what Atoms conform to, the Atom class provides the UI details. In Atomic Design, components contain subcomponents that are related to the parent component. For example Organisms contain Molecules, which contain Atoms.

Constructors

Link copied to clipboard
fun Atom()

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
val hasSubComponents: Boolean

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

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

the components related to this atom, as mentioned in description

Link copied to clipboard
abstract val type: AtomType

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

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
val Atom.textAtom: TextAtom?

Convenience function to get the atom as a text atom