-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add callback based props to all types
- Loading branch information
1 parent
b14ac41
commit 0999093
Showing
11 changed files
with
98 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import React from 'react'; | ||
import { ConsoleTrackingHandler, TrackEvent, Tracking } from 'react-clarify'; | ||
import { ConsoleTrackingHandler, TrackEvent, TrackingProvider } from 'react-clarify'; | ||
|
||
export default function Example() { | ||
return ( | ||
<Tracking data={{ user: { name: 'johndoe', id: '123456' }, company: 'acme' }}> | ||
<TrackingProvider data={{ user: { name: 'johndoe', id: '123456' }, company: 'acme' }}> | ||
<ConsoleTrackingHandler level="info" transform={JSON.stringify}> | ||
<Tracking data={{ page: 'Home Page' }}> | ||
<TrackingProvider data={{ page: 'Home Page' }}> | ||
<p>Clicking the button will log a message to the console and send a tracking event.</p> | ||
|
||
<TrackEvent event="click" data={{ element: 'My button' }}> | ||
<button type="button">Click me</button> | ||
</TrackEvent> | ||
</Tracking> | ||
</TrackingProvider> | ||
</ConsoleTrackingHandler> | ||
</Tracking> | ||
</TrackingProvider> | ||
); | ||
} |