Guaxu Docs
    Preparing search index...

    Function classes

    • Constructs a class list enabling/disabling the provided classes based on conditions

      Parameters

      • conditions: ConditionsList

        Object where the keys are classnames and the values are booleans telling if they should be active

      Returns string

      A string of all the space-separated enabled classnames. It has extra spaces near the start/end, so it can be safely concatenated with other classlists

      classes({
      selected: selectedID === this.id,
      "display-none": isInvisible,
      "display-block": !isInvisible,
      })