material-auto-rotating-carousel icon indicating copy to clipboard operation
material-auto-rotating-carousel copied to clipboard

Title and Subtitle rendering inside Slide

Open danielbyun opened this issue 4 years ago • 2 comments

I have an array of strings to display on the carousel for the subtitle prop, and it throws an error. It runs in the production fine, but was wondering if the library can support the array of strings for title and subtitle.

Thank you!

danielbyun avatar Jul 21 '20 04:07 danielbyun

You can handle selecting one of the array items yourself when using the component. It only displays one title and subtitle at a time so it makes sense to keep the props as single strings imho.

leMaik avatar Jul 21 '20 07:07 leMaik

Screen Shot 2020-08-13 at 11 54 56 AM

I use it like so where the title displays the date and the subtitle has to display multiple data at once (calories and the foods). I would like to customize the look of the subtitles to better display the information.

Therefore I get this error: index.js:1 Warning: Failed prop type: Invalid prop 'subtitle' of type 'object' supplied to 'Slide', expected 'string'.

danielbyun avatar Aug 13 '20 02:08 danielbyun