coachlist-widgets
TypeScript icon, indicating that this package has built-in type declarations

1.1.320 • Public • Published

Coachlist Widgets Integration Guide

This package contains all widgets for coachlist and coachlist pro. Available Widgets:

  • Booking Widget
  • ISP Widget

Installation

Install the package as a dependency.

npm i coachlist-widgets

Usage

Here is a guide to integrate widgets into your application:

Note: Don't forget to import styles: import 'coachlist-widgets/dist/cjs/main.css'

Booking Widget

import BookingWidget from "coachlist-widgets"
import 'coachlist-widgets/dist/cjs/main.css'

const YourComponent = () => {
    return (
        <>
            <BookingWidget
                onShare={onShare}
                baseURL={baseURL}
                selectedSport={selectedSport}
                handler={handler}
                nickname={nickname}
                sportsID={sportsID}
                onSessionSelectionChange={onSessionSelectionChange}
            />
        </>
    )
}

export default YourComponent

Prop Types

nickname: string
sportsID?: string
selectedSport?: string
onShare?: (data: any) => void
baseURL: string
onSessionSelectionChange: (data: any) => void
handler?: {
    fetchRecord: () => void
}

######################################

ISP Widget

import ISPWidget from "coachlist-widgets"
import 'coachlist-widgets/dist/cjs/main.css'

const YourComponent = () => {
    return (
        <>
            <ISPWidget
                authToken={authToken}
                baseURL={baseURL}
                profileId={profileId}
                route={{
                    currentRoute: string
                    getCurrentRoute: (route: string) => void
                }}
                viewProfileClickHandler={viewProfileClickHandler}
            />
        </>
    )
}

export default YourComponent

Prop Typesp

baseURL: string
profileId: string
authToken: string
route: {
  currentRoute: string
  getCurrentRoute: (route: string) => void
}
viewProfileClickHandler: (url: string) => void

Readme

Keywords

none

Package Sidebar

Install

npm i coachlist-widgets

Weekly Downloads

108

Version

1.1.320

License

ISC

Unpacked Size

2.4 MB

Total Files

378

Last publish

Collaborators

  • uzairdotbukhari
  • cl-admin