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

Cannot move buttons horizontally #206

Open
cdcasey opened this issue Dec 7, 2022 · 3 comments
Open

Cannot move buttons horizontally #206

cdcasey opened this issue Dec 7, 2022 · 3 comments

Comments

@cdcasey
Copy link

cdcasey commented Dec 7, 2022

Since navButtonsWrapperProps and navButtonsProps apply to both buttons simultaneously, there seems to be no way to adjust the left style of the previous button or the right style of the next button. Even using the NavButton prop is proving difficult with the overflow set to hidden, although I'm still playing with that. Am I missing something simple?

@Jlnbnt
Copy link

Jlnbnt commented Dec 10, 2022

Hi @cdcasey !

One workaround would be to target the button with :

<Carousel
     sx={{
       /* Left button */
       "& .css-hn784z button": {
         marginTop: "50px",
         color: "#53dc17",
       },
       /* Right button */
       "& .css-1abc02a button": {
         marginTop: "250px",
         color: "#FF0000",
       },
     }}
   >
{content}
</Carousel>

Result :

nav

@cdcasey
Copy link
Author

cdcasey commented Dec 12, 2022

That's not horizontal, that's vertical. Also, those class names look generated. I'll double-check, but I don't think I could count on the ones I see being the same as the ones you pasted here, or indeed even having the same names between builds.

@Jlnbnt
Copy link

Jlnbnt commented Dec 12, 2022

Once you've targeted the button you're free to apply whatever style you want.

I've checked on the official demo, the class names appear to be the same.

Again, it is a workaround, there might be an official way to do it ! Let me know if you find one, I'd be interested.

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