Skip to content

Commit

Permalink
docs(getOffsetTop): fix wrong docs and console.log usage (#2018)
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker authored and joakbjerk committed Mar 27, 2023
1 parent 3f96264 commit 5debf76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const UploadPrefilledFileList = () => (
{() => {
const Component = () => {
const { files, setFiles } = Upload.useUpload('file-list')
console.log('files', files)

if (files.length) {
console.log('files', files)
}

useMockFiles(setFiles, { errorMessage: 'This is no real file!' })

Expand All @@ -60,7 +63,10 @@ export const UploadSingleFile = () => (
{() => {
const Component = () => {
const { files, setFiles } = Upload.useUpload('upload-single-file')
console.log('files', files, setFiles)

if (files.length) {
console.log('files', files, setFiles)
}

return (
<Upload
Expand Down Expand Up @@ -230,7 +236,10 @@ export const UploadAcceptedFormats = () => (
const { files, setFiles } = Upload.useUpload(
'upload-accepted-formats'
)
console.log('files', files, setFiles)

if (files.length) {
console.log('files', files, setFiles)
}

return (
<Upload
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ Get the HTML Element offset to the top of the browser window, minus `offset`.
```js
import { getOffsetTop } from '@dnb/eufemia/shared/helpers'

getOffsetTop(offset: Number) // returns Number
getOffsetTop(element: HTMLElement) // returns Number
```

### applyPageFocus
Expand Down

0 comments on commit 5debf76

Please sign in to comment.