UNPKG
oneframe-react
Version:
latest (0.2.12)
0.2.12
0.2.11
0.2.10
0.2.0
0.1.8999
0.1.8002
0.1.8001
0.1.899
0.1.897
0.1.894
0.1.893
0.1.892
0.1.891
0.1.210
0.1.209
0.1.208
0.1.207
0.1.206
0.1.205
0.1.203
0.1.202
0.1.201
0.1.200
0.1.108
0.1.107
0.1.106
0.1.105
0.1.104
0.1.103
0.1.102
0.1.101
0.1.100
0.1.98
0.1.97
0.1.96
0.1.95
0.1.94
0.1.93
0.1.92
0.1.91
0.1.89
0.1.88
0.1.87
0.1.86
0.1.85
0.1.84
0.1.83
0.1.82
0.1.81
0.1.80
0.1.78
0.1.77
0.1.76
0.1.75
0.1.74
0.1.72
0.1.71
0.1.70
0.1.69
0.1.67
0.1.66
0.1.65
0.1.62
0.1.61
0.1.60
0.1.59
0.1.58
0.1.57
0.1.56
0.1.55
0.1.54
0.1.53
0.1.52
0.1.51
0.1.50
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.9
0.1.1
0.1.0
Oneframe React ## Components, Hooks, Helper Functions & State Management
oneframe-react
/
bundle
/
lib
/
helper
/
scrollTo.js
12 lines
(11 loc)
•
328 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
exports
.
default
=
(
elementId
) =>
{
const
el =
document
.
getElementById
(elementId);
if
(el) { el.
scrollIntoView
({
behavior
:
'smooth'
}); }
else
{
console
.
warn
(
`Scroll target element is not found:
${elementId}
`
); } };