Skip to content

Commit

Permalink
[Documentation] Fix some typos in the documentation and add some
Browse files Browse the repository at this point in the history
additional examples of custom matcher usage for clarity
  • Loading branch information
tjjjwxzq committed Jun 8, 2021
1 parent af03fb9 commit 985d238
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ const Orientation = createMediaMatcher({
landscape: '(orientation: landscape)',
});

<Orientation.Match portrait="One" landscape="Second" />;
const height = Orientation.useMedia({
portrait: "50vw",
landscape: "50vw"
});
<Orientation.Matcher portrait="One" landscape="Second" />;
<Orientation.ServerRender portrait="rendering on portrait" landscape="rendering on landscape" />;
```

### More examples of usage
Expand All @@ -143,7 +148,7 @@ import { MediaMatcher, ProvideMediaMatchers } from 'react-media-match';
<Below desktop>will be rendered on mobile and tablet</Above>
<Below including desktop>
will be rendered on mobile, tablet and desktop
</Above>
</Below>
<MediaMatches>
{' '}
// will provide matches information via render-props
Expand Down Expand Up @@ -199,7 +204,7 @@ react-media-match provides an API for "default" queries, and a factory method to
- `Matcher`
- `Provider`
- `Mock`
- `SSR`
- `ServerRender`
- `Consumer`

## Default API
Expand Down

0 comments on commit 985d238

Please sign in to comment.