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

[Feature request] Tooltip position addition #2

Open
czepter opened this issue Dec 3, 2020 · 3 comments
Open

[Feature request] Tooltip position addition #2

czepter opened this issue Dec 3, 2020 · 3 comments

Comments

@czepter
Copy link

czepter commented Dec 3, 2020

Could you please add an option to choose from which side the tooltip offset is taken?
eg.

{
   ...
   size: 10,
   offset: 10,
   side: left, [top, bottom, right]
}
@gvital3230
Copy link
Owner

Hi. This plugin already makes all four variants simultaneously (left, right, top and bottom). So you can use any of it. Why separate option for this can be useful at your opinion?

@wfischer42
Copy link

Does that mean we can already set the offset independently for each variant? If so, what's the syntax?

@gvital3230
Copy link
Owner

You can generate multiple classes with different offsets, like this

module.exports = {
    //...    
    theme: {
        tooltipArrows: theme => ({
            'danger-arrow-offset-10': {
                borderColor: theme('colors.red.400'),
                borderWidth: 1,
                backgroundColor: theme('colors.red.200'),
                size: 10,
                offset: 10
            },
           'danger-arrow-offset-20': {
                borderColor: theme('colors.red.400'),
                borderWidth: 1,
                backgroundColor: theme('colors.red.200'),
                size: 10,
                offset: 20
            },
        }),
    }
//...
}

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

3 participants