How to use @skyux/toast - 5 common examples

To help you get started, we’ve selected a few @skyux/toast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github blackbaud / skyux2 / src / demos / toast / toast-demo.component.ts View on Github external
SkyToastCustomDemoContext
} from './toast-custom-demo-context';

import {
  SkyToastCustomDemoComponent
} from './toast-custom-demo.component';

@Component({
  selector: 'sky-toast-demo',
  templateUrl: './toast-demo.component.html'
})
export class SkyToastDemoComponent {
  public selectedType: SkyToastType = SkyToastType.Info;
  public types: any[] = [
    {
      value: SkyToastType.Info,
      label: 'Info'
    },
    {
      value: SkyToastType.Success,
      label: 'Success'
    },
    {
      value: SkyToastType.Warning,
      label: 'Warning'
    },
    {
      value: SkyToastType.Danger,
      label: 'Danger'
    }
  ];
github blackbaud / skyux2 / src / demos / toast / toast-demo.component.ts View on Github external
} from '@skyux/toast';

import {
  SkyToastCustomDemoContext
} from './toast-custom-demo-context';

import {
  SkyToastCustomDemoComponent
} from './toast-custom-demo.component';

@Component({
  selector: 'sky-toast-demo',
  templateUrl: './toast-demo.component.html'
})
export class SkyToastDemoComponent {
  public selectedType: SkyToastType = SkyToastType.Info;
  public types: any[] = [
    {
      value: SkyToastType.Info,
      label: 'Info'
    },
    {
      value: SkyToastType.Success,
      label: 'Success'
    },
    {
      value: SkyToastType.Warning,
      label: 'Warning'
    },
    {
      value: SkyToastType.Danger,
      label: 'Danger'
github blackbaud / skyux2 / src / demos / toast / toast-demo.component.ts View on Github external
public selectedType: SkyToastType = SkyToastType.Info;
  public types: any[] = [
    {
      value: SkyToastType.Info,
      label: 'Info'
    },
    {
      value: SkyToastType.Success,
      label: 'Success'
    },
    {
      value: SkyToastType.Warning,
      label: 'Warning'
    },
    {
      value: SkyToastType.Danger,
      label: 'Danger'
    }
  ];

  constructor(
    private toastService: SkyToastService
  ) { }

  public openMessage(): void {
    const instance = this.toastService.openMessage(
      `This is a sample toast message.`,
      {
        type: this.selectedType
      }
    );
github blackbaud / skyux2 / src / demos / toast / toast-demo.component.ts View on Github external
SkyToastCustomDemoComponent
} from './toast-custom-demo.component';

@Component({
  selector: 'sky-toast-demo',
  templateUrl: './toast-demo.component.html'
})
export class SkyToastDemoComponent {
  public selectedType: SkyToastType = SkyToastType.Info;
  public types: any[] = [
    {
      value: SkyToastType.Info,
      label: 'Info'
    },
    {
      value: SkyToastType.Success,
      label: 'Success'
    },
    {
      value: SkyToastType.Warning,
      label: 'Warning'
    },
    {
      value: SkyToastType.Danger,
      label: 'Danger'
    }
  ];

  constructor(
    private toastService: SkyToastService
  ) { }
github blackbaud / skyux2 / src / demos / toast / toast-demo.component.ts View on Github external
selector: 'sky-toast-demo',
  templateUrl: './toast-demo.component.html'
})
export class SkyToastDemoComponent {
  public selectedType: SkyToastType = SkyToastType.Info;
  public types: any[] = [
    {
      value: SkyToastType.Info,
      label: 'Info'
    },
    {
      value: SkyToastType.Success,
      label: 'Success'
    },
    {
      value: SkyToastType.Warning,
      label: 'Warning'
    },
    {
      value: SkyToastType.Danger,
      label: 'Danger'
    }
  ];

  constructor(
    private toastService: SkyToastService
  ) { }

  public openMessage(): void {
    const instance = this.toastService.openMessage(
      `This is a sample toast message.`,
      {

@skyux/toast

This library was generated with [Nx](https://nx.dev).

MIT
Latest version published 2 days ago

Package Health Score

78 / 100
Full package analysis