scone-js-common
TypeScript icon, indicating that this package has built-in type declarations

1.0.49 • Public • Published

Scone JS Common

React component library for Scone

Install

$ npm install scone-js-common

or if you prefer yarn

$ yarn add scone-js-common

List of components that are available in the library

import { SconeCalculator } from "scone-js-common";

or;

import SconeCalculator from "scone-js-common/build/components/SconeCalculator";

Usage

import { SconeCalculator } from "scone-js-common";

const Demo = () => {
  const handleCompletion = (footPrintDetails: any) => {
    console.log("completed", footPrintDetails);
  };

  const handleStepChange = (step: number, footPrintDetails: any) => {
    console.log("step", step, footPrintDetails);
  };

  const handleSkip = (footPrintDetails: any) => {
    console.log("skip", footPrintDetails);
  };

  return (
    <SconeCalculator
      showSideBar={true}
      showSkip={true}
      locale={"en-US"}
      onCompletion={handleCompletion}
      onStepChange={handleStepChange}
      onSkip={handleSkip}
      calculatorApiUrl={API_RAW_CALCULATE}
    />
  );
};

Component props

SconeCalculator

interface SconeCalculatorProps {
  showSideBar?: boolean;
  calculatorApiUrl?: string;
  showSkip?: boolean;
  offsetRoute?: string;
  locale?: Locale;
  onCompletion?: (footPrint: any) => void;
  onStepChange?: (step: number, footPrint: any) => void;
  onSkip?: (footPrint: any) => void;
}

Development

To generate all *.js, *.d.ts files

$ npm run build

Readme

Keywords

none

Package Sidebar

Install

npm i scone-js-common

Weekly Downloads

7

Version

1.0.49

License

ISC

Unpacked Size

9.63 MB

Total Files

77

Last publish

Collaborators

  • scone