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

Responsive #28

Open
ARusov opened this issue Mar 11, 2018 · 3 comments
Open

Responsive #28

ARusov opened this issue Mar 11, 2018 · 3 comments

Comments

@ARusov
Copy link

ARusov commented Mar 11, 2018

Hi,
Nice component
But I did app for desktop and mobile.
I can not use this component on mobile. It is not responsive

@craigh411
Copy link
Owner

You should be able to change the star size based on the screen size yourself. I will take a look to see if I can do something to make this responsive, however, it's slightly tricky because the size of each star is passed to SVG's width attribute which doesn't behave like a normal page element, so I would still probably need to allow some way to pass user defined break points and sizes.

@selaromdotnet
Copy link

built in responsive abilities would be slick, but in a pinch, you can use bootstrap to show/hide two instances based on device sizing:

            <div class="d-none d-sm-none d-md-block">
                <star-rating :max-rating="10" :increment="0.1" :rating="vote_average"  :star-size="50"></star-rating>
            </div>
            <div class="d-md-none">
                <star-rating :max-rating="10" :increment="0.1" :rating="vote_average" :star-size="25"></star-rating>
            </div>

hope this helps, and thanks for your work and sharing this great component!

@kosmeln
Copy link

kosmeln commented Nov 4, 2020

When is the expected release date for this feature?

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

No branches or pull requests

4 participants