import { ChangeDetectionStrategy, Component } from '@angular/core';
import { PorscheDesignSystemModule } from '@porsche-design-system/components-angular';
@Component({
selector: 'porsche-design-system-app',
styles: [
`
p-scroller > *:not(:last-child) {
margin-right: 1rem;
}
button {
margin: 0 1rem 1rem 0;
}
`,
],
template: `
Scroll to start
Scroll to middle
Scroll to end
START - some tag content
MIDDLE - some tag content
END - some tag content
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [PorscheDesignSystemModule],
})
export class ExampleComponent {
scrollPosition: number = 220;
isSmooth: boolean = false;
onClick = (scrollPosition: number) => {
this.scrollPosition = scrollPosition;
this.isSmooth = true;
};
}