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

Ability to Override Default Content #2

Open
syntaxlexx opened this issue Aug 22, 2019 · 1 comment
Open

Ability to Override Default Content #2

syntaxlexx opened this issue Aug 22, 2019 · 1 comment

Comments

@syntaxlexx
Copy link

It would be very nice if one would be able to override the default buttons. Maybe using slots?

@gTerrusa
Copy link

gTerrusa commented Feb 2, 2021

I agree that this would be nice, but in the meantime, a workaround could be something like this:

in template:

 <div class="links">
    <span class="facebook">
        <facebook :url="url" :scale="scale"></facebook>
    </span>
    <span class="twitter">
        <twitter :url="url" :title="title" :scale="scale"></twitter>
    </span>
    <span class="linkedin">
        <linkedin :url="url" :scale="scale"></linkedin>
    </span>
    <span class="email">
        <email :url="url" :subject="title" :scale="scale"></email>
    </span>
</div>

sass:

.links {
    display: flex;
    align-items: center;
    justify-content: center;

    > span {
        width: 50px;
        height: 50px;
        cursor: pointer;

        &:not(:last-of-type) {
            margin-right: 16px;
        }

        svg {
            opacity: 0;
            width: 50px;
            height: 50px;
        }

        &.facebook {
            background: center / contain no-repeat  url('/img/valencia/social/fb.png');
        }
        &.twitter {
            background: center / contain no-repeat  url('/img/valencia/social/twitter.png');
        }
        &.linkedin {
            background: center / contain no-repeat  url('/img/valencia/social/in.png');
        }
        &.email {
            background: center / contain no-repeat  url('/img/valencia/social/mail.png');
        }
    }
}

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

2 participants