react-carousel icon indicating copy to clipboard operation
react-carousel copied to clipboard

itemWidth and offset in relative units

Open katiawheeler opened this issue 5 years ago • 9 comments

Issuehunt badges

Is your feature request related to a problem? Please describe. I would like to use responsive units (em and rem) for both offset and itemWidth but am unable to due to the restraint of the number prop type and the assignment to px.

Describe the solution you'd like It'd be nice if these props were refactored to accept either a number or string - if string, don't append the px, if number, do.

Describe alternatives you've considered N/A

Additional context N/A


IssueHunt Summary

Backers (Total: $0.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

katiawheeler avatar Jan 23 '20 23:01 katiawheeler

Thanks @katiawheeler . We'll consider this proposal.

piotr-s-brainhub avatar Jan 23 '20 23:01 piotr-s-brainhub

@katiawheeler

Can I ask you to fill in this form https://docs.google.com/forms/d/1tfRs1Io49tJBwz-06aDnz8hrJ3WySJTi45y4k6hHGaQ ?

piotr-s-brainhub avatar Feb 07 '20 21:02 piotr-s-brainhub

@katiawheeler

what do you think about https://github.com/brainhubeu/react-carousel/pull/285 ?

you can check out offsetUnit and itemWidthUnit on https://beghp.github.io/gh-pages-rc-3

if you want to check it in a real project, you can write "@brainhubeu/react-carousel": "brainhubeu/react-carousel#191-relative-units", in your package.json

later maybe we'll change the interface to have an object passed but I'd like you to tell me whether that PR resolves your problem

piotr-s-brainhub avatar Feb 25 '20 14:02 piotr-s-brainhub

@piotr-s-brainhub Yes, I definitely think this would work!

katiawheeler avatar Feb 25 '20 17:02 katiawheeler

@katiawheeler

did you test that or your assumption is theoretical?

piotr-s-brainhub avatar Feb 25 '20 17:02 piotr-s-brainhub

@piotr-s-brainhub My assumption is theoretical. I tested it on the deployed gh-pages with a scenario similar to ours and it seemed to do the job!

katiawheeler avatar Feb 25 '20 19:02 katiawheeler

@katiawheeler

Unfortunately, we have a problem with relative units.

piotr-s-brainhub avatar May 11 '20 19:05 piotr-s-brainhub

@piotr-s-brainhub has funded $1.00 to this issue.


issuehunt-oss[bot] avatar May 14 '20 14:05 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $1.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jun 23 '20 20:06 issuehunt-oss[bot]