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

add conditionals to hide arrow and dot buttons if only one slide #40

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

danalvrz
Copy link
Contributor

To have a trigger for styling single-slide Slider blocks (ex. hide .slider-dots)

@danalvrz danalvrz requested a review from sneridagh December 19, 2023 00:23
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal is to remove the slider-dots when there is only one slide, why not simply add a conditional around the <div className="slider-dots">?

@danalvrz
Copy link
Contributor Author

danalvrz commented Dec 20, 2023

@davisagli another use would be to hide the arrow buttons when it is a single-slide, there is a conditional around them, but no way of hiding them just for the single-slide case. Should we include this condition around them as well?

@davisagli
Copy link
Member

@danalvrz Yes, I think it makes sense to also skip rendering the arrow buttons if there is only one slide.

@danalvrz danalvrz changed the title add single-slide classname to View add conditionals to hide arrow and dot buttons if only one slide Dec 20, 2023
@sneridagh sneridagh merged commit d9aa3d3 into main Dec 22, 2023
4 checks passed
@sneridagh sneridagh deleted the add-single-slide-classname branch December 22, 2023 10:02
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

Successfully merging this pull request may close these issues.

3 participants