Skip to content
This repository was archived by the owner on May 20, 2021. It is now read-only.

add anchorProps to <Link> so that attributes can be set to the enclosed anchor element #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dpnolte
Copy link

@dpnolte dpnolte commented May 7, 2019

Hi,
First of all, thank you for the awesome package.

This PR is completely based on #12, so full credits to @clemMoine . I needed to be able to set attributes to the anchor attributes (styling, data-, onclick, etc.), and created my own fork based on the feedback in #12 from @ericvicenti . However, that PR has been inactive for a while. That's why I'm opening this PR in the hope it gets fixed sooner. @clemMoine, if you rather want to update your PR, I'll delete this one.

Exmaple Usage:

                <Link
                  routeName="Docs"
                  navigation={navigation}
                  anchorProps={{
                    'data-testid': 'docs-link',
                    style: {
                       color: 'silver',
                    },
                  }}
                >
                  Docs
                </Link>

Best regards,
Derk

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

Successfully merging this pull request may close these issues.

1 participant