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

Need caption for {children} elements #27

Closed
sergru opened this issue May 2, 2021 · 1 comment
Closed

Need caption for {children} elements #27

sergru opened this issue May 2, 2021 · 1 comment
Labels
feature request New feature or request wont add This proposed feature will not be added

Comments

@sergru
Copy link

sergru commented May 2, 2021

I use react-gallery-carousel with {chidren} to show different types of items in carousel (images, video and audio media).
It works fine but I cannot add the caption for the item.

Solution I'd like
Add special component that has required attributes like caption and supports {children} to handle user defined inner html as usual React component.

@yifaneye
Copy link
Owner

yifaneye commented May 4, 2021

Hi @sergru ,

Thank you for using react-gallery-carousel!

Currently, the children is served as an option for "user-managed" slides. Since I believe that developer users may have their own markup and styles to be placed in each slide.

I am sorry to inform you that I am not going to add caption at this stage since that will introduce the need to allow users to customize the caption in a lot of ways. However, I am sure that you can make caption similar to the default caption for the managed image slides.

The markup can be found at

export const Caption = memo((props) => {

The styles can be found at

Hope it helps!

@yifaneye yifaneye added feature request New feature or request wont add This proposed feature will not be added labels May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request wont add This proposed feature will not be added
Projects
None yet
Development

No branches or pull requests

2 participants