-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Tooltip and StepNumber passed props in favor of useCopilot context * Un-register step after name change * Add changelog
- Loading branch information
Showing
13 changed files
with
316 additions
and
147 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"react-native-copilot": minor | ||
--- | ||
|
||
Remove Tooltip and StepNumber passed props in favor of useCopilot context | ||
Un-register the step after name change and re-register with the new name | ||
Add tests for CopilotStep |
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,11 +1,15 @@ | ||
import React from "react"; | ||
import { View, Text } from "react-native"; | ||
import { type StepNumberProps } from "../../types"; | ||
import React, { type FunctionComponent } from "react"; | ||
import { Text, View } from "react-native"; | ||
import { useCopilot } from "../../contexts/CopilotProvider"; | ||
|
||
import { styles } from "../style"; | ||
|
||
export const StepNumber = ({ currentStepNumber }: StepNumberProps) => ( | ||
<View style={styles.stepNumber}> | ||
<Text style={[styles.stepNumberText]}>{currentStepNumber}</Text> | ||
</View> | ||
); | ||
export const StepNumber: FunctionComponent<unknown> = () => { | ||
const { currentStepNumber } = useCopilot(); | ||
|
||
return ( | ||
<View style={styles.stepNumber}> | ||
<Text style={styles.stepNumberText}>{currentStepNumber}</Text> | ||
</View> | ||
); | ||
}; |
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
Oops, something went wrong.