Link

Overview


Table of contents


EnumRule (type alias)

Define a Enum Rule

Signature

export type EnumRule<E extends object, O extends object, T extends object> = {
  [K in keyof E]: {
    [name in NonNullable<E[K] extends string ? E[K] : never>]:
      | ((a: { value: NonNullable<E[K]>; name: K; theme: T; source: E }) => CssNode<O>)
      | CssNode<O>
  }
}

Added in v0.2.0

enumRuleToStandRule (function)

Signature


export const enumRuleToStandRule =
    <E extends object, O extends object, T extends object>
        (ruleEnum: EnumRule<E, O, T>) =>
        mapValues(ruleEnum, a => ...

Added in v0.2.0

parse (function)

Parse Enum Rule,repalce input’s property name with define property

Signature


export const parse = <T extends object>(
    themeDefaultValue: T, nameMonoid: Monoid<string> = monoidString
) => <I extends object, O extends object>
        (rule: EnumRule<I, O, T>) => ...

Added in v0.2.0