Skip to content

Commit 367a53e

Browse files
committed
Mark code examples as JS for code highlighting.
1 parent 5fa51d0 commit 367a53e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install react-onclickoutside --save
1818

1919
(or `--save-dev` depending on your needs). You then use it in your components as:
2020

21-
```
21+
```javascript
2222
var Component = React.createClass({
2323
mixins: [
2424
require('react-onclickoutside')
@@ -39,13 +39,13 @@ bower install react-onclickoutside
3939

4040
and then include it as script via:
4141

42-
```
42+
```html
4343
<script src="bower_components/react-onclickoutside/index.js"></script>
4444
```
4545

4646
Then use it as:
4747

48-
```
48+
```javascript
4949
var Component = React.createClass({
5050
mixins: [
5151
OnClickOutside
@@ -66,7 +66,7 @@ When using this mixin, a component has two functions that can be used to explici
6666

6767
In addition, you can create a component that uses this mixin such that it has the code set up and ready to go, but not listening for outside click events until you explicitly issue its `enableOnClickOutside()`, by passing in a properly called `disableOnClickOutside`:
6868

69-
```
69+
```javascript
7070
var Component = React.createClass({
7171
mixins: [ ... ],
7272
handleClickOutside: function(evt) {
@@ -91,7 +91,7 @@ Since mixins can't be used with ES6/2015 class React components a
9191
[Higher-Order Component (HOC)](https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750)
9292
and [ES7 decorator](https://github.com/wycats/javascript-decorators) are bundled with the mixin:
9393

94-
```
94+
```javascript
9595
import listensToClickOutside from 'react-onclickoutside/decorator';
9696

9797
class Component extends React.Component {

0 commit comments

Comments
 (0)