Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need copilot step for multiple element on custom component #304

Open
tanzeel152 opened this issue Sep 27, 2023 · 3 comments
Open

Need copilot step for multiple element on custom component #304

tanzeel152 opened this issue Sep 27, 2023 · 3 comments

Comments

@tanzeel152
Copy link

How to implement copilot for components for multiple UI?

@laurensk
Copy link

laurensk commented Oct 4, 2023

I just found out you can do something like this:

import React from 'react';
import {View} from 'react-native';

const CustomCopilotView = (props: {children: JSX.Element; copilot?: any}) => {
  return <View {...props.copilot}>{props.children}</View>;
};

export default CustomCopilotView;

Just wrap your custom component into this CustomCopilotView inside of a step!

@sagarhudge-eaton
Copy link

@laurensk what to pass in {children: JSX.Element; copilot?: any} could you please help on function call

@laurensk
Copy link

laurensk commented Oct 6, 2023

Here is a usage example:

<CopilotStep
        order={1}
        name="step1"
        text="This is the text for the step.">
        <CustomCopilotView>
                // Your component goes here...
        </CustomCopilotView>
</CopilotStep>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants