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

How To Utitlize "navText" option #75

Open
ikechukwukalu opened this issue Jul 13, 2020 · 0 comments
Open

How To Utitlize "navText" option #75

ikechukwukalu opened this issue Jul 13, 2020 · 0 comments

Comments

@ikechukwukalu
Copy link

ikechukwukalu commented Jul 13, 2020

I need to add nav buttons to my owlCarousel.
Here's a sample code:

navText = () => {
    return [  
      <span key={'1_1'} class='lnr lnr-arrow-up'></span>, 
      <span key={'2_2'} class='lnr lnr-arrow-down'></span>
    ];
  }
<OwlCarousel
      className="active-testimonial"
      items= {2}
      loop
      margin= {30}
      autoplayHoverPause
      dots
      autoplay
      nav
      navText= {this.navText}
      responsive= {{
         0: {
                items: 1
             },
         480: {
               items: 1,
             },
         768: {
               items: 2,
             }
       }}
>
   <div className="single-testimonial item d-flex flex-row">
      <div className="thumb">
          <img
                className="img-fluid"
                src={this.state.base_url+"assets/img/elements/user1.png"}
                alt=""
           />
      </div>
      <div className="desc">
              <p>
                  Do you want to be even more successful? Learn to love
                  learning and growth. The more effort you put into
                  improving your skills, the bigger the payoff you.
              </p>
              <h4>Harriet Maxwell</h4>
              <p>CEO at Google</p>
          </div>
     </div>
     <div className="single-testimonial item d-flex flex-row">
        <div className="thumb">
            <img
                className="img-fluid"
                src={this.state.base_url+"assets/img/elements/user2.png"}
                alt=""
            />
        </div>
        <div className="desc">
             <p>
                A purpose is the eternal condition for success. Every
                former smoker can tell you just how hard it is to stop
                smoking cigarettes. However.
            </p>
            <h4>Carolyn Craig</h4>
            <p>CEO at Facebook</p>
        </div>
    </div>
</OwlCarousel>
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

1 participant