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

Grid gap is provided also for the first and the last item in a row. How do you override that? #2

Open
kingmaker9841 opened this issue Nov 3, 2020 · 3 comments

Comments

@kingmaker9841
Copy link

No description provided.

@kingmaker9841 kingmaker9841 changed the title Grid gap is provided also for the first and the last item in a row Grid gap is provided also for the first and the last item in a row. How do you override that? Nov 3, 2020
@x3388638
Copy link
Owner

x3388638 commented Nov 7, 2020

Not really sure what do you mean.
For default usage, it doesn't apply the gap to start of the first item and end of the last item, which will be like
截圖 2020-11-07 下午11 09 22

If you want to add some space for that, just add some margin to carousel item
截圖 2020-11-07 下午11 10 49
here is the example:
https://63nui.csb.app/
https://codesandbox.io/s/quirky-forest-63nui?file=/src/App.js

@bazw
Copy link

bazw commented Mar 22, 2021

I think this one might refer to the 20px margin on the far left and far right on one of the containers. I ran into that myself but have just offset it with a containerStyle on the main container:
<Carousel cols={4} rows={2} containerStyle={{margin: '0 -20px'}}>

Great component @x3388638 works well thank you!

@Charnchon
Copy link

your comment saved me @bazw

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

4 participants