mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +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'
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|