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

Bump lodash from 4.17.10 to 4.17.15 in /example #5

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

69 changes: 0 additions & 69 deletions .eslintrc

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Logs
logs
*.log
dist
.rpt2_cache
!example/umd

# Runtime data
pids
Expand All @@ -27,5 +30,3 @@ build/Release
node_modules
lib
*.zip

yarn.lock
43 changes: 36 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
example
.babelrc
.eslintrc
index.html
webpack.config.build.js
webpack.config.js
# Logs
logs
*.log
dist

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
lib

example
tslint.json
*.zip
.npmignore
.vscode
tsconfig.json
rollup.config.js
.yarn-lock
.rpt2_cache
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"search.exclude": {
"**/node_modules": true,
"**/yarn.lock": true,
"**/dist": true,
},
"emmet.showExpandedAbbreviation": "never",
"tslint.enable": true,
"tslint.run": "onType",
"tslint.autoFixOnSave": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"typescript.locale": "en",
"editor.tabSize": 4,
"editor.insertSpaces": true,
"workbench.colorCustomizations": {
"editorWarning.foreground": "#FFAA00"
}
}
44 changes: 33 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
# react-owl-carousel [![npm version](https://img.shields.io/npm/v/react-owl-carousel.svg?style=flat)](https://www.npmjs.com/package/react-owl-carousel)
[React](http://facebook.github.io/react/) + [Owl Carousel 2.2](https://owlcarousel2.github.io/OwlCarousel2/)
[React](http://facebook.github.io/react/) + [Owl Carousel 2.3](https://owlcarousel2.github.io/OwlCarousel2/)

### 1.Getting Started
### 1. Getting Started

```jsx
import React from 'react';
import OwlCarousel from 'react-owl-carousel';
* You need to inject a global window.jQuery first.

e.g. webpack

```js
// ...
plugins: [
// other plugins,
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
],
//...
```

you can use html script tag to inject jquery as well.

### 2.Set up your javascript
### 2. Set up your component
wrap your divs inside the OwlCarousel component

```jsx
<OwlCarousel
className="owl-theme"
loop margin={10} nav
import React from 'react';
import OwlCarousel from 'react-owl-carousel';
import 'owl.carousel/dist/assets/owl.carousel.css';
import 'owl.carousel/dist/assets/owl.theme.default.css';

// ....

// className "owl-theme" is optional
<OwlCarousel
className="owl-theme"
loop
margin={10}
nav
>
<div class="item"><h4>1</h4></div>
<div class="item"><h4>1</h4></div>
<div class="item"><h4>2</h4></div>
<div class="item"><h4>3</h4></div>
<div class="item"><h4>4</h4></div>
Expand All @@ -31,7 +54,6 @@ wrap your divs inside the OwlCarousel component
<div class="item"><h4>12</h4></div>
</OwlCarousel>
```
className "owl-theme" is optional

## Event
| Name | Descrption |
Expand Down
Loading