Skip to content

Commit 4da840a

Browse files
authored
Merge pull request #42 from lencioni/patch-1
Use JSX syntax highlighting for JSX in readme
2 parents 51c3772 + 8e665b9 commit 4da840a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can find the library on `window.ReactMedia`.
3838

3939
Render a `<Media>` component with a `query` prop whose value is a valid [CSS media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries). The `children` prop should be a function whose only argument will be a boolean flag that indicates whether the media query matches or not.
4040

41-
```js
41+
```jsx
4242
import React from 'react'
4343
import Media from 'react-media'
4444

@@ -65,7 +65,7 @@ If you use a regular React element as `children` (i.e. `<Media><SomethingHere/><
6565

6666
For the common case of "only render something when the media query matches", you can use a `render` prop that is only called if the query matches.
6767

68-
```js
68+
```jsx
6969
import React from 'react'
7070
import Media from 'react-media'
7171

@@ -86,7 +86,7 @@ The `render` prop is never called if the query does not match.
8686

8787
`<Media query>` also accepts an object, similar to [React's built-in support for inline style objects](https://facebook.github.io/react/tips/inline-styles.html) in e.g. `<div style>`. These objects are converted to CSS media queries via [json2mq](https://github.com/akiran/json2mq/blob/master/README.md#usage).
8888

89-
```js
89+
```jsx
9090
import React from 'react'
9191
import Media from 'react-media'
9292

0 commit comments

Comments
 (0)