Skip to content

Commit

Permalink
feat(sf-icon-arrow-forward): new component
Browse files Browse the repository at this point in the history
  • Loading branch information
runyasak committed Sep 6, 2023
1 parent 8dc5ac3 commit e3306e8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/ng-storefront-ui/src/lib/sf-icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export * from './sf-icon-add/sf-icon-add.component';

export * from './sf-icon-arrow-forward/sf-icon-arrow-forward.component';

export * from './sf-icon-base/sf-icon-base.component';

export * from './sf-icon-chevron-left/sf-icon-chevron-left.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { SfIconArrowForwardComponent } from './sf-icon-arrow-forward.component';

describe('SfIconArrowForwardComponent', () => {
let component: SfIconArrowForwardComponent;
let fixture: ComponentFixture<SfIconArrowForwardComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
imports: [SfIconArrowForwardComponent]
});
fixture = TestBed.createComponent(SfIconArrowForwardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SfIconBaseComponent } from '../sf-icon-base/sf-icon-base.component';
import { SfIconSize } from '../../../types';

@Component({
selector: 'sf-icon-arrow-forward',
standalone: true,
imports: [CommonModule, SfIconBaseComponent],
template: `<sf-icon-base [size]="size" viewBox="0 0 24 24" data-testid="arrow-forward">
<svg:path
d="M11.3 19.3a.994.994 0 0 1-.288-.7.91.91 0 0 1 .263-.7l4.9-4.9H5a.968.968 0 0 1-.713-.288A.967.967 0 0 1 4 12a.97.97 0 0 1 .287-.713A.97.97 0 0 1 5 11h11.175l-4.9-4.9a.91.91 0 0 1-.263-.7.994.994 0 0 1 .288-.7.948.948 0 0 1 .7-.275.95.95 0 0 1 .7.275l6.6 6.6c.1.083.171.187.213.312.041.125.062.255.062.388s-.02.258-.062.375a.883.883 0 0 1-.213.325l-6.6 6.6a.948.948 0 0 1-.7.275.948.948 0 0 1-.7-.275Z"
/>
</sf-icon-base>`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SfIconArrowForwardComponent {
@Input() size: keyof typeof SfIconSize = SfIconSize.base;
}

0 comments on commit e3306e8

Please sign in to comment.