mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
15 lines
369 B
JavaScript
15 lines
369 B
JavaScript
|
import Component from '@glimmer/component';
|
||
|
import {action} from '@ember/object';
|
||
|
|
||
|
export default class KoenigMenuContentComponent extends Component {
|
||
|
@action
|
||
|
scrollIntoView(element, [doScroll]) {
|
||
|
if (doScroll) {
|
||
|
element.scrollIntoView({
|
||
|
behavior: 'smooth',
|
||
|
block: 'nearest'
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|