How to use the @nebular/theme.NbLayoutDirection.RTL function in @nebular/theme

To help you get started, we’ve selected a few @nebular/theme 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 akveo / nebular / src / framework / theme / components / menu / menu.spec.ts View on Github external
it('should change arrow direction when document direction changes', () => {
    const menuItems = [{ title: '', children: [{ title: '' }] }];
    const { fixture } = createSingleMenuComponent(menuItems);
    const iconComponent = fixture.debugElement.query(By.directive(NbIconComponent)) as DebugElement;
    const directionService: NbLayoutDirectionService = TestBed.get(NbLayoutDirectionService);

    expect(iconComponent.componentInstance.icon).toEqual('chevron-left-outline');

    directionService.setDirection(NbLayoutDirection.RTL);
    fixture.detectChanges();

    expect(iconComponent.componentInstance.icon).toEqual('chevron-right-outline');
  });
github akveo / nebular / src / app / layout-direction-toggle / layout-direction-toggle.component.ts View on Github external
toggleFlow() {
    const oppositeDirection = this.isRtl
      ? NbLayoutDirection.LTR
      : NbLayoutDirection.RTL;
    this.directionService.setDirection(oppositeDirection);
  }
}