kjelsrud.dev/node_modules/shiki/samples/gjs.sample
2023-07-19 21:31:30 +02:00

18 lines
499 B
Text

import { helper } from '@ember/component/helper';
import { modifier } from 'ember-modifier';
const plusOne = helper(([num]) => num + 1);
const setScrollPosition = modifier((element, [position]) => {
element.scrollTop = position
});
<template>
<div class="scroll-container" {{setScrollPosition @scrollPos}}>
{{#each @items as |item index|}}
Item #{{plusOne index}}: {{item}}
{{/each}}
</div>
</template>
# From https://github.com/ember-template-imports/ember-template-imports