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

Allow multiple clickableClass #6741

Closed

Conversation

fchevallieratecna
Copy link

@fchevallieratecna fchevallieratecna commented Jun 8, 2023

We have an error when trying to set a class for the clickableClass props.

The error is :

failed to execute 'add' on 'domtokenlist': the token provided ('relative top-20') contains html space characters, which are not valid in token

For example here :

<Swiper
      slidesPerView={1}
      spaceBetween={10}
      pagination={{
        clickable: true,
        bulletActiveClass: '!bg-grey-black !w-6 !rounded-xl opacity-1',
        clickableClass: `!relative !top-20`, // <--- ERROR
        bulletClass: `w-32 h-32 inline-block`,
      }}
      navigation
      breakpoints={{
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
      }}
      className="h-full w-full"
      modules={[Pagination, Navigation]}
    >
      {components.map((component, i) => (
        <SwiperSlide className="!flex !items-center !justify-center" key={i}>
          {component}
        </SwiperSlide>
      ))}
    </Swiper>
    ```

The change fixes this error. 

Thanks !

@nolimits4web
Copy link
Owner

Thank you! Had to merge it manually

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

Successfully merging this pull request may close these issues.

2 participants