Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove onClick border #252

Closed
wegory opened this issue Mar 8, 2021 · 3 comments
Closed

Remove onClick border #252

wegory opened this issue Mar 8, 2021 · 3 comments

Comments

@wegory
Copy link

wegory commented Mar 8, 2021

Hello hello. This might be a dumb question but when I clicked into a Geography (in all of the examples from the documentation), a rectangle with a blue-white border containing the clicked Geography appears. How do I prevent that from being visible? :)

@zimrick
Copy link
Contributor

zimrick commented Mar 8, 2021

If you want to remove that you can just set outline to none for the geography via the custom style prop.

<Geography
  style={{
    default: { outline: "none" },
    hover: { outline: "none" },
    pressed: { outline: "none" },
  }}
/>

Hope this helps
Cheers

@wegory
Copy link
Author

wegory commented Mar 8, 2021

Ahhh got it! Cheers mate! :)

@ngothiensinh
Copy link

ngothiensinh commented Nov 3, 2024

Style component. You also need the setting for focus out too.

import { Geography } from 'react-simple-maps';
import styled from 'styled-components';

const StyledGeography = styled(Geography)`
  &:active {
    outline: none;
  }

  &:focus,
  &:focus-visible {
    outline: none;
  }
`;

export default StyledGeography;

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

No branches or pull requests

3 participants