Skip to content

Commit

Permalink
1.0.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-haller-roby committed Oct 9, 2024
1 parent 2541183 commit 5d7be9d
Show file tree
Hide file tree
Showing 5 changed files with 799 additions and 47 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,38 @@ npm install @sensible-weather/widget-react

Then the widget was imported in [src/app/page.tsx](src/app/page.tsx)

```jsx
import { SensibleWeatherGuarantee, SwuiTheme } from '@sensible-weather/widget-react';
```tsx
import {Quote, SensibleWidget} from '@sensible-weather/widget-react';

export default function Home() {
const guaranteeCreatedCallback = (quote: Quote) => {
console.log('guaranteeCreatedCallback', quote);
}
const selectGuaranteeCreatedCallback = (quote: Quote) => {
console.log('selectGuaranteeCreatedCallback', quote);
}
const unselectGuaranteeCreatedCallback = (quote: Quote) => {
console.log('unselectGuaranteeCreatedCallback', quote);
}
return (
<div className={styles.page}>
<SwuiTheme>
<SensibleWeatherGuarantee/>
</SwuiTheme>
<SensibleWidget
partnerID="<<PROVIDE YOUR PARTNER ID HERE>>"
productID="<<PROVIDE YOUR PRODUCT ID HERE>>"
quoteParameters={{
coverageEndDate: '2024-12-18',
coverageStartDate: '2024-12-11',
currency: 'usd',
exposureLatitude: 37.77664018315584,
exposureLongitude: -111.63836828825272,
exposureName: 'Example Exposure Name',
exposureTotalCoverageAmount: 500,
langLocale: 'en-us',
}}
guaranteeCreatedCallback={guaranteeCreatedCallback}
selectGuaranteeCallback={selectGuaranteeCreatedCallback}
unselectGuaranteeCallback={unselectGuaranteeCreatedCallback}
/>
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */
import withFonts from 'next-fonts';
const nextConfig = {};

export default nextConfig;
export default withFonts();
Loading

0 comments on commit 5d7be9d

Please sign in to comment.