Carbon/src/js/Anchor.js
Cadence Ember 4855b2c6a0
All checks were successful
continuous-integration/drone/push Build is passing
Update build script for relative paths everywhere
2020-10-20 23:25:26 +13:00

15 lines
259 B
JavaScript

import {ElemJS} from $to_relative "/js/basic.js"
class Anchor extends ElemJS {
constructor() {
super("div")
this.class("c-anchor")
}
scroll() {
// console.log("anchor scrolled")
this.element.scrollIntoView({block: "start"})
}
}
export {Anchor}