GitHub

Text Snippet

The text snippet component shows a snippet of text, with the ability to show or hide content beyond one line of text.

DaffTextSnippetComponent

import { DaffTextSnippetComponent } from '@daffodil/design/text-snippet'
@Component()
class DaffTextSnippetComponent {
  @Input() condensed: true
  @Input() html: ''
  @ViewChild() contentRef: ElementRef
  @ViewChild() htmlRef: ElementRef
  @Output() toggle: EventEmitter<boolean>
  toggleSnippet()
}
Selector: 'daff-text-snippet'

Properties

Name Type Description
@Input() condensed true

A property to track whether or not the component should render a condensed version of the content.

@Input() html ''
contentRef ElementRef
htmlRef ElementRef
@Output() toggle EventEmitter<boolean>

An output event that can be used to track the state of the component externally.

toggleSnippet