@eiendomsprofil/finn-widget-web

3.0.0 • Public • Published

Widget on finn.no

Usage

Min height of container should be 320px

import React from 'react'
import ReactDOM from 'react-dom'
import FinnWidget from '@eiendomsprofil/finn-widget-web'

const ENDPOINT = 'https://example.com'

ReactDOM.render(
  <FinnWidget
    endpoint={ENDPOINT}
    config={{
      resizeThrottleMs: 150,
      scrollThrottleMs: 66,
    }}
  />,
  container,
)

See full example

API

Name Type Default Params Description
endpoint string '' - URL to endpoint
onLoad Function NOOP Version number Called once data is successfully loaded from server
onError Function NOOP info, Version number Called if error occurs. Possible values: FETCH_ERROR, RENDER_ERROR, MISSING_ENDPOINT
onScrollStarted Function NOOP Version number Called when user starts scrolling the widget. Fires only one time
onScrolledToEnd Function NOOP Version number Called when user has scrolled to end the of the widget. Fires only one time
config object { resizeThrottleMs: 150, scrollThrottleMs: 66 } - Object containing resizeThrottleMs, scrollThrottleMs

Readme

Keywords

none

Package Sidebar

Install

npm i @eiendomsprofil/finn-widget-web

Weekly Downloads

95

Version

3.0.0

License

ISC

Unpacked Size

195 kB

Total Files

4

Last publish

Collaborators

  • asundlihardig
  • bjornar.helland
  • qualbeen
  • aleksandervines