question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change Arrow Color and backdrop color

See original GitHub issue

Current Behavior The top arrow color cannot be changed backdrop color also don’t work

I tried this for backdrop and it didn’t work Input Code

export default copilot({
  animated: true, // Can be true or false
  overlay: 'svg', // Can be either view or svg
  backdropColor:"rgb(0, 0, 0, 0.9)",
  stepNumberComponent: StepNumber1,
  tooltipComponent:TooltipComponent1
})(Homepage);

Expected behavior/code There should be some way to customise arrow color and backdrop color, Arrow color is hard-coded here in CopilotModal.js :

 if (verticalPosition === 'bottom') {
      tooltip.top = obj.top + obj.height + MARGIN;
      arrow.borderBottomColor = '#fff';
      arrow.top = tooltip.top - (ARROW_SIZE * 2);
    } else {
      tooltip.bottom = layout.height - (obj.top - MARGIN);
      arrow.borderTopColor = '#fff';
      arrow.bottom = tooltip.bottom - (ARROW_SIZE * 2);
    }

and backdrop color is here:

 <Svg pointerEvents="none" width={this.state.canvasSize.x} height={this.state.canvasSize.y}>
   <AnimatedSvgPath
      ref={(ref) => { this.mask = ref; }}
      fill="rgba(0, 0, 0, 0.4)"
      fillRule="evenodd"
      strokeWidth={1}
      d={path(this.state.size, this.state.position, this.state.canvasSize)}
    />
 </Svg>

Environment

  • Device: iPhone 6s Simulator
  • OS:iOS12
  • react-native-copilot: v2.4.1
  • react-native: v0.57
  • react-native-svg: v7.1.0

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Manhazitocommented, Mar 1, 2019

It would be awesome to be able to change the arrow and tooltip background colours. Currently they are hardcoded. As @AishwaryaSurana mentioned, arrow color is hardcoded in components/CopilotModal,js, and the tooltip background colour is hardcoded in components/style.js

I was able to change the backdrop color after installing with command: npm install --save @okgrow/react-native-copilot@https://github.com/okgrow/react-native-copilot#master

1reaction
AishwaryaSuranacommented, Dec 3, 2018

I tried rgba as well. It didn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Easy way to change arrow color ? Not the background color
I want to change the inner arrow color. In the demo the browser has the css as font-size: 20px; line-height: 1; color: #00558B;...
Read more >
Change Arrow color or background color for show na...
Hello, Is there any way to change the arrow color or background color for show navigation for powerapps gallery.
Read more >
Change HTML Select arrow background color - Stack Overflow
I have a select menu with options. In Firefox, it has an "arrow button" enter image description ...
Read more >
Remove background from arrows and change arrow colors?
1) Replace “#SLIDER_ID” with the CSS ID for your slider, e.g. #myimage_slider. 2) Replace “.white” with “.black” if you have selected the blacl...
Read more >
How do I change the color of the gallery arrows? White arrows ...
Click on the Gallery Icons color circle and change the arrows to your desired color. If that doesn't do the trick then it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found