GitHub

Colorable

Colorable enforces consistent use of color across components.

Directives

DaffColorableDirective

import { DaffColorableDirective } from '@daffodil/design'

Enforces consistent use of DaffColor on a component by applying color-specific CSS classes and validating the color in dev mode.

@Directive()
class DaffColorableDirective implements OnChanges, OnInit {
  defaultColor: DaffColor

  @Input() color: DaffColor
}

Inputs

color
DaffColor
Default
Description

The color of the component.

Properties

defaultColor
DaffColor
Default
Description

The default color used when no color is set.


Types

DaffPalette

Deprecated

import { DaffPalette } from '@daffodil/design'

type DaffPalette = DaffColor

DaffColor

import { DaffColor } from '@daffodil/design'

The available color options.

type DaffColor = 'primary' | 'secondary' | 'tertiary' | 'light' | 'dark' | 'theme' | 'theme-contrast' | 'black' | 'white' | undefined

DaffColorable

Deprecated

import { DaffColorable } from '@daffodil/design'

interface DaffColorable {
  color: DaffColor
}