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

Missing captioned.js file inside node module react-awesome-slider #172

Open
elviajero971 opened this issue Mar 25, 2021 · 4 comments
Open

Comments

@elviajero971
Copy link

Hello there,
I'm trying to add some content to each of my sliders (that has an image already).
According to the documentation, I have to use Captioned HOC. But when I import all the needed files like so:

import AwesomeSlider from 'react-awesome-slider'; import withCaption from 'react-awesome-slider/dist/captioned'; import 'react-awesome-slider/dist/styles.css'; import 'react-awesome-slider/dist/captioned.css';
I'm running into an issue, it can't find the captioned file. You can see on these pictures that i have react-awesome-slider into my package.json file, but inside the node module, i only have the captioned.css files...

Screenshot 2021-03-25 at 10 15 13

Screenshot 2021-03-25 at 10 14 46

I have tried to reinstall the node module, changed of version, but got nothing different in return.
Anyone have got an idea about this issue ?

Thanks by advance and have a good day.

Beside that, great job for this module, it seems like an awesome library!! :D

@trolit
Copy link

trolit commented Mar 25, 2021

Hello. You might want to refer to issue #165. By default package doesn't contain captioned.js. I understand it that way that it's only example how you can extend slider so it was made only for example purposes and those dependencies from example fit example project :D

@elviajero971
Copy link
Author

Thanks! I will try that then!

@elviajero971
Copy link
Author

It seems like i have to import more than just the captioned.js, by a lot of the files inside the folder. Any simple way to use the caption feature ?

@trolit
Copy link

trolit commented Mar 25, 2021

From what I've checked, only helpers section(examples.js) would need additional file import to make captioned.js work. Everything else is included in the ras package.

I would suggest to include example.js with captioned.js manually in node_modules just to check if slider implementation is working fine and if it does, in the next step I would remove them and define captioned.js implementation inside project putting examples.js used content inside captioned.js single file as e.g. "rasCustomCaptioned.js" and reference it instead of captioned.js(which anyways isn't available in the package). I'm assuming that the rest of the imports will be recognized as from "node_modules". If not I would try modifying these paths to reference them.

30.03 - updated comment to be more detailed

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