Text alignable enforces consistent use of text alignment across components.
import { DaffTextAlignableDirective } from '@daffodil/design'
DaffTextAlignableDirective enforces consistent use of text alignment across components.
@Directive()
class DaffTextAlignableDirective implements DaffTextAlignable, OnChanges, OnInit {
defaultAlignment: DaffTextAlignment
@Input() textAlignment: DaffTextAlignment
}
DaffTextAlignment| Default | – |
|---|---|
| Description | The text alignment of the component. |
DaffTextAlignment| Default | – |
|---|---|
| Description | The default used when no text alignment is set. |
import { DaffTextAlignable } from '@daffodil/design'
interface DaffTextAlignable {
textAlignment: DaffTextAlignment
}
import { DaffTextAlignment } from '@daffodil/design'
type DaffTextAlignment = 'left' | 'center' | 'right'
import { DaffTextAlignmentEnum } from '@daffodil/design'
This enum will be removed from the public api in v1.0.0.
enum DaffTextAlignmentEnum {
Left = DaffTextAlignmentEnum.Left,
Center = DaffTextAlignmentEnum.Center,
Right = DaffTextAlignmentEnum.Right,
}