Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove the component border shown onClick in react?

Whenever I click on any of the components I get a black border, although when I click away the border disappears. How do I prevent the web app from doing so? Below there is a picture of what I get in my app.

Also, this is a link to a sandbox where I have the same issue: https://codesandbox.io/s/es6-spread-operator-practice-drbyh?file=/src/components/App.jsx

enter image description here

like image 708
David Ciocoiu Avatar asked Dec 10 '22 00:12

David Ciocoiu


1 Answers

This is caused by the &focus css selector as shown bij the inspector.

enter image description here

Add outline: none to the <button> to remove it;

<button style={{outline: 'none'}} onClick={onInputSubmit}>
like image 143
0stone0 Avatar answered Dec 12 '22 12:12

0stone0